Skip to main content

Module start

Module start 

Source
Expand description

Cluster startup entry point: dispatches to bootstrap, join, or restart.

The decision tree is deliberately small and delegates every non-trivial choice to a dedicated module:

  • restart (super::restart) — if the catalog already reports this node as bootstrapped, we always take the restart path, regardless of seed_nodes or force_bootstrap. The catalog is the authoritative source of truth once it exists.
  • bootstrap (super::bootstrap_fn) — taken when this node is the elected bootstrapper (lowest-addr seed), or when the operator forced it via ClusterConfig::force_bootstrap, or when no other seed is running. See [super::probe::should_bootstrap].
  • join (super::join) — everything else. The join path owns its own retry-with-backoff loop and leader-redirect handling, so this dispatcher does not need to retry at this layer.

Functions§

register_default_subsystems
Register the default set of cluster subsystems into registry.
start_cluster
Start the cluster state machine — bootstrap, join, or restart.
start_cluster_subsystems
Spawn the default cluster subsystems sharing raft_multi_raft with the running crate::raft_loop::RaftLoop.