Skip to main content

Module core

Module core 

Source
Expand description

The KRaft quorum state machine: on_event(event, log, now) -> Vec<Action>.

This module root holds the QuorumStateMachine type, its constructor and accessors, and the on_event dispatch. One submodule per event family holds the handlers: membership applies voter records, vote_request answers an inbound vote, election runs the pre-vote and vote rounds, leadership reacts to a leader announcing its epoch, and replication serves and answers Fetch.

Structs§

QuorumStateMachine
The hand-rolled KIP-595 + KIP-996 quorum state machine.
QuorumTimeouts
The two timer extents of a QuorumStateMachine, as Kafka’s QuorumConfig holds them.

Functions§

election_jitter_ms
Deterministic per-(node, epoch) election-timeout jitter in [0, base_ms).