Expand description
TopicBasedRemoteLogMetadataManager: the production
RemoteLogMetadataManager
implementation backed by a publish and subscribe MetadataEventLog.
The manager keeps the canonical in-memory view in an
InmemoryRemoteLogMetadataManager, so the lifecycle state machine is the
single source of truth for cache mutation. It uses the
MetadataEventLog as the durable event log.
Lifecycle:
TopicBasedRemoteLogMetadataManager::start: load any on-disk snapshot into the cache and spawn the consumer pump subscribed to NOTHING. The broker then drives the consumed set withTopicBasedRemoteLogMetadataManager::reconcile_assignment. That call adds only the__remote_log_metadatapartitions that cover the user-partitions this broker leads or follows.NotReadygates a newly-added partition until the pump reaches the HWM observed at assignment time. A partition this broker does not consume is a genuineOk(None), and the manager never serves it from any stale cache.- Mutation calls, which are
add,update, andput_partition_delete: serialize, publish, and wait until the consumer pump has applied the published offset to the inner cache. The sync return means “the event has been recorded and is visible to local reads”. - Read calls: pure local lookups against the inner cache.
- Drop /
TopicBasedRemoteLogMetadataManager::shutdown: cancel the consumer pump.
Structs§
- Metadata
Partition Readiness - Readiness of one assigned
__remote_log_metadatapartition, asTopicBasedRemoteLogMetadataManager::metadata_partition_readinessreports it. - Topic
Based Remote LogMetadata Manager - Production
RemoteLogMetadataManagerbacked by the__remote_log_metadatatopic through aMetadataEventLogadapter.