Majority voting prevents two leaders in one term.

highlighted = computed this step

One leader per term

A failed election can leave a term with no leader. A later timeout starts a new term and can elect one. Note: the timeline shows the no-leader gap before the later leader.

one leader per term\text{one leader per term}

No majority first

The trace ultimately has 1 leader, and that leader appears in term 2. Note: the earlier term has no leader in the render.

leaders=1,leader term=2\text{leaders}=1,\quad \text{leader term}=2

a simplified Raft over a tiny cluster: terms, votes, leader election, and the term-restricted commit rule are exact on these traces; the full safety proof, membership changes, snapshotting, log compaction, and real RPC/timing are beyond these traces - no product claims.

One leader per term commitIndex 0 0 1 2 3 4 A t0/F t1/C t1/C t2/F t2/F B t0/F t1/F t1/F t2/C t2/L C t0/F t1/F t1/F t2/F t2/F vote tally t1 A:1; t2 B:3 leader log B t1:old

Next term elects

The successful election tally has 3 votes. Note: the new term, not the failed term, installs the leader.

votes=3\text{votes}=3

a simplified Raft over a tiny cluster: terms, votes, leader election, and the term-restricted commit rule are exact on these traces; the full safety proof, membership changes, snapshotting, log compaction, and real RPC/timing are beyond these traces - no product claims.

One leader per term commitIndex 0 0 1 2 3 4 A t0/F t1/C t1/C t2/F t2/F B t0/F t1/F t1/F t2/C t2/L C t0/F t1/F t1/F t2/F t2/F vote tally t1 A:1; t2 B:3 leader log B t1:old

Summary

One-leader-per-term comes from majority voting over ordered terms. Note: this is simplified Raft; the full safety proof, membership changes, snapshots, and real timing are beyond these traces.

term safety\text{term safety}