Expand description
Node lifecycle management: join, leave, decommission.
Handles the full lifecycle of a node in the cluster:
- Join: Node contacts seed, receives topology, joins as Learner, catches up Raft logs, promoted to Active voter.
- Decommission: Node drains leadership, migrates all vShards to other nodes, then shuts down cleanly.
- Leave: Node is removed from topology after decommission completes.
All transitions are replicated via the metadata Raft group as
MetadataEntry::TopologyChange / MetadataEntry::RoutingChange
entries and applied through the MetadataApplier on every node.
Structs§
- Decommission
Result - Result of a decommission operation.
Functions§
- handle_
learner_ promotion - Handle learner promotion after state catch-up validation.
- handle_
node_ join - Register a joining node in the local topology and produce the
MetadataEntryto be proposed on the metadata Raft group. - is_
safe_ to_ remove - Check if a node can be safely removed from the cluster.
- plan_
decommission - Plan a node decommission — thin wrapper over
crate::decommission::plan_full_decommissionthat returns the full ordered sequence of metadata entries. Kept as a public convenience for older call sites; new code should use thedecommissionmodule directly.