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 to ensure consistency across the cluster.

Structs§

DecommissionResult
Result of a decommission operation.

Functions§

handle_learner_promotion
Handle learner promotion after state catch-up validation.
handle_node_join
Apply a topology change: handle join, leave, or state transition.
is_safe_to_remove
Check if a node can be safely removed from the cluster.
plan_decommission
Plan a node decommission: compute which vShards to migrate and where.