Skip to main content

Module lifecycle

Module lifecycle 

Source
Expand description

Node lifecycle management: join, leave, decommission.

Handles the full lifecycle of a node in the cluster:

  1. Join: Node contacts seed, receives topology, joins as Learner, catches up Raft logs, promoted to Active voter.
  2. Decommission: Node drains leadership, migrates all vShards to other nodes, then shuts down cleanly.
  3. 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§

DecommissionResult
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 MetadataEntry to 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_decommission that returns the full ordered sequence of metadata entries. Kept as a public convenience for older call sites; new code should use the decommission module directly.