Skip to main content

Module control

Module control 

Source
Expand description

Control plane: leader election, assignment snapshots, barrier coordination. Cluster control plane: leader election, assignment snapshots, and barrier coordination.

Re-exports§

pub use barrier::BarrierAck;
pub use barrier::BarrierAnnouncement;
pub use barrier::BarrierCoordinator;
pub use barrier::ClusterKv;
pub use barrier::InMemoryKv;
pub use barrier::Phase;
pub use barrier::QuorumOutcome;
pub use barrier::ACK_KEY;
pub use barrier::ANNOUNCEMENT_KEY;
pub use controller::ClusterController;
pub use crate::checkpoint_decision::CheckpointDecisionStore;
pub use crate::checkpoint_decision::DecisionError;
pub use catalog_manifest::CatalogManifest;
pub use catalog_manifest::CatalogManifestEntry;
pub use catalog_manifest::CatalogManifestError;
pub use catalog_manifest::CatalogManifestStore;
pub use leader::leader_of;
pub use leader_lease::lease_grants_leadership;
pub use leader_lease::LeaderLease;
pub use leader_lease::LeaderLeaseConfig;
pub use leader_lease::LeaderLeaseManager;
pub use leader_lease::LeaderLeaseStore;
pub use leader_lease::LeaseError;
pub use leader_lease::LeaseOutcome;
pub use snapshot::AssignmentSnapshot;
pub use snapshot::AssignmentSnapshotStore;
pub use snapshot::RotateOutcome;
pub use snapshot::SnapshotError;
pub use chitchat_kv::ChitchatKv;
pub use query::remote_scan_client;
pub use query::QueryClientPool;
pub use query::QueryHandlerSlot;
pub use query::RemoteBatchStream;
pub use query::RemoteQueryHandler;
pub use tls::set_cluster_tls;
pub use tls::ClusterTls;

Modules§

barrier
Cross-instance barrier protocol. Direct gRPC leader-to-follower calls under cluster, falling back to gossip-KV announce/ack/poll.
catalog_manifest
Cluster-wide catalog manifest: the ordered DDL needed to rebuild a node’s logical catalog (sources, tables, streams, materialized views, sinks).
chitchat_kv
Chitchat-backed ClusterKv. Reads filter by live_nodes() so suspected peers don’t count toward quorum.
controller
Facade over ClusterKv + BarrierCoordinator + membership watch. None on CheckpointCoordinator means single-instance mode.
leader
Weak leader election: lowest-ID live instance wins. Split-brain is tolerated because epoch=N/_COMMIT is CAS-guarded.
leader_lease
CAS-backed leader lease with TTL and a monotonic fencing token. One object per sequence at control/leader-lease/v{seq:016}.json, written with PutMode::Create so the CAS works on every backend (LocalFileSystem included). The lease prevents split-brain: a stale leader whose lease has expired loses the CAS to whoever acquires next, and the fencing token advances only on an owner change so followers can reject writes carrying a stale token.
query
In-engine distributed query (pull path): a coordinator fans RemoteScan out to peers owning part of a table/MV and unions their Arrow batches.
snapshot
Durable vnode→instance assignment snapshots. One object per version at control/assignment-snapshots/v{N:016}.json. Chitchat carries the ephemeral copy; these files survive full-cluster restart.
tls
Process-wide mutual TLS for the cluster control plane (barrier, query, shuffle). One identity per node/process, installed once at startup.