Expand description
SwappableRlmm: a RemoteLogMetadataManager facade whose backing
implementation can be replaced atomically after construction.
It lets crate::TopicBasedRemoteLogMetadataManager take over from
crate::NotReadyRlmm after the
broker’s listener accept loop is serving, so the manager’s loopback
AdminClient call to provision __remote_log_metadata has a server to
talk to. Until a caller calls SwappableRlmm::swap, every RLMM method
delegates to the placeholder. After the swap, every call delegates to the
new implementation.
§Invariant during the swap window
Trait calls between construction and the first swap go to the
placeholder, which is normally crate::NotReadyRlmm. Once swap returns,
every later call uses the new implementation. Each trait method snapshots
the inner Arc under a read lock and releases the lock before it
delegates. A call already in progress can finish on the old implementation
after the swap. Separate calls within a larger operation can therefore use
different implementations.
Structs§
- Swappable
Rlmm - Hot-swappable
RemoteLogMetadataManagerwrapper.