Type Definition openraft::CommittedLeaderId

source ·
pub type CommittedLeaderId<NID> = LeaderId<NID>;
Expand description

The unique identifier of a leader that is already granted by a quorum in phase-1(voting).

CommittedLeaderId may contains less information than LeaderId, because it implies the constraint that a quorum has granted it.

For a total order LeaderId, the CommittedLeaderId is the same.

For a partial order LeaderId, we know that all of the granted leader-id must be a total order set. Therefor once it is granted by a quorum, it only keeps the information that makes leader-ids a correct total order set, e.g., in standard raft, voted_for: Option<node_id> can be removed from (term, voted_for) once it is granted. This is why standard raft stores just a term in log entry.