Skip to main content

Crate nodedb_raft

Crate nodedb_raft 

Source
Expand description

Raft consensus primitives: leader election, log replication, snapshots, membership change (joint consensus), and snapshot framing.

This crate provides the algorithm only — transport, persistence, and state-machine application are the consumer’s responsibility. It is consumed by nodedb-cluster (Multi-Raft per vShard for replicated collections) and by nodedb (single-group Raft for the metadata catalog and the cross-engine surrogate counter).

Re-exports§

pub use error::RaftError;
pub use error::Result;
pub use log::RaftLog;
pub use message::AppendEntriesRequest;
pub use message::AppendEntriesResponse;
pub use message::InstallSnapshotRequest;
pub use message::InstallSnapshotResponse;
pub use message::LogEntry;
pub use message::RequestVoteRequest;
pub use message::RequestVoteResponse;
pub use node::RaftNode;
pub use node::Ready;
pub use snapshot_framing::SNAPSHOT_FORMAT_VERSION;
pub use snapshot_framing::SNAPSHOT_MAGIC;
pub use snapshot_framing::SnapshotEngineId;
pub use snapshot_framing::SnapshotFramingError;
pub use snapshot_framing::decode_snapshot_chunk;
pub use snapshot_framing::encode_snapshot_chunk;
pub use state::HardState;
pub use state::NodeRole;
pub use state::PeerRole;
pub use storage::LogStorage;
pub use transport::RaftTransport;

Modules§

error
log
message
node
Raft single-group state machine.
snapshot_framing
Snapshot chunk framing for InstallSnapshot RPCs.
state
storage
transport