Skip to main content

Module cluster

Module cluster 

Source
Expand description

Cluster (multi-node) mode startup orchestrator.

StructsΒ§

ClusterHandle

EnumsΒ§

ClusterStartupError
DiscoveryImpl πŸ”’
Enum dispatch β€” Discovery trait uses async fn (not dyn-compatible).

FunctionsΒ§

build_shuffle_receiver πŸ”’
Bind the ShuffleReceiver. When gossip discovery is active, publish the bound address under SHUFFLE_ADDR_KEY so peer senders can discover it on first send.
build_shuffle_sender πŸ”’
Build an outbound shuffle sender. When gossip discovery is active, publish advertise_addr under SHUFFLE_ADDR_KEY so peers find us, and give the sender a KV handle for reverse lookup. Static discovery has no KV tier, so we hand back a bare sender β€” peers must be registered explicitly by whatever sets up the shuffle topology.
num_cpus πŸ”’
resolve_vnode_assignment πŸ”’
Boot-time vnode assignment. If an AssignmentSnapshot exists in shared storage (written by a prior cluster incarnation or a peer that raced here first), every node adopts it β€” the fresh node doesn’t fight over vnodes that are already claimed. Otherwise we compute a round-robin split of this node’s known peers and CAS-create the snapshot; losers of the CAS race re-load and adopt.
shuffle_advertise_addr πŸ”’
Compute the address peers should use to reach our ShuffleReceiver.
spawn_membership_watcher πŸ”’
Watches membership changes and logs peer join/leave/crash events.
start_cluster
Start a LaminarDB server in cluster (multi-node) mode.