Expand description
Per-Raft-group applied-index watchers.
A single primitive — AppliedIndexWatcher — tracks the highest
log index applied on this node for one Raft group. The
GroupAppliedWatchers registry indexes one watcher per group so
callers (proposers, consistent reads, lease renewals, recovery
checks) can wait on the apply watermark of their group rather
than only the metadata group.
Bump points (single source of truth for “applied on this node”):
crate::raft_loop::tickafter the per-group apply phase — covers regular committed-entry application for every locally mounted group, including the metadata group.crate::raft_loop::handle_rpcafterhandle_install_snapshot— covers the snapshot-install path wherelast_appliedjumps tolast_included_indexwithout going through the apply loop.
Both bump points read the canonical applied index from the Raft node itself rather than mirroring it from a side channel, so the watcher cannot drift from Raft’s own state.
Re-exports§
pub use registry::GroupAppliedWatchers;pub use watcher::AppliedIndexWatcher;pub use watcher::WaitOutcome;
Modules§
- registry
- Per-group registry of
AppliedIndexWatchers. - watcher
- Sync wait primitive used to block on a Raft group’s local apply watermark.