A follower's request for a read index is its own confirmation, and a rebuilt node counts only after a commit without it #3

Merged
ferociousbyte merged 1 commit from main into stable 2026-11-15 21:00:24 +00:00

A follower sends its request after its reads began, in a term no later than the leader's: it had voted in no later
term then. With the leader and the voters that answered a round sent after the request, that is a majority no later
leader could be elected without, so in a cluster of three the leader answers at once and a read on a follower costs
one exchange with the leader instead of two. Measured on unilayer.cloud before: the barrier cost 0.9 ms per read
against DotNext's 0.4 ms. Locally (unilayer's load test, raft engine), follower reads at 32 clients went from 32.7k to
34.4k-38.1k req/s. ReadConfirmedByAskerAlone (the two taken for a majority of five) fails 69 of 100 seeds of a leader
and a follower cut off together; the correct protocol passes them.

The changed paths showed a fault in plan 07 (seed 61 of 2,000 of the cluster seeded from restored databases, state
machine safety): a leader took the end of its log, committed already, as the target a rebuilt follower had to reach.
Replaced meanwhile, it counted the follower at once and committed an entry of term 1 over one of term 2. The leader
now appends a no-op when it learns of the rebuild and counts the follower only after committing that without it.
RejoinAtCommittedEnd is the old rule as a mutation; seed 61 fails with it and passes without.

The figure-8 mutation is now caught in 3 of 8,000 seeds (first 1425) against 2 of 2,000 before; its random search
goes to 2,000 seeds, the check itself is unchanged and the script still covers it. Suite: 227 tests green in 64 s;
every simulation at 2,000 seeds green in 7 min 14 s.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

A follower sends its request after its reads began, in a term no later than the leader's: it had voted in no later term then. With the leader and the voters that answered a round sent after the request, that is a majority no later leader could be elected without, so in a cluster of three the leader answers at once and a read on a follower costs one exchange with the leader instead of two. Measured on unilayer.cloud before: the barrier cost 0.9 ms per read against DotNext's 0.4 ms. Locally (unilayer's load test, raft engine), follower reads at 32 clients went from 32.7k to 34.4k-38.1k req/s. ReadConfirmedByAskerAlone (the two taken for a majority of five) fails 69 of 100 seeds of a leader and a follower cut off together; the correct protocol passes them. The changed paths showed a fault in plan 07 (seed 61 of 2,000 of the cluster seeded from restored databases, state machine safety): a leader took the end of its log, committed already, as the target a rebuilt follower had to reach. Replaced meanwhile, it counted the follower at once and committed an entry of term 1 over one of term 2. The leader now appends a no-op when it learns of the rebuild and counts the follower only after committing that without it. RejoinAtCommittedEnd is the old rule as a mutation; seed 61 fails with it and passes without. The figure-8 mutation is now caught in 3 of 8,000 seeds (first 1425) against 2 of 2,000 before; its random search goes to 2,000 seeds, the check itself is unchanged and the script still covers it. Suite: 227 tests green in 64 s; every simulation at 2,000 seeds green in 7 min 14 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A follower sends its request after its reads began, in a term no later than the leader's: it had voted in no later
term then. With the leader and the voters that answered a round sent after the request, that is a majority no later
leader could be elected without, so in a cluster of three the leader answers at once and a read on a follower costs
one exchange with the leader instead of two. Measured on unilayer.cloud before: the barrier cost 0.9 ms per read
against DotNext's 0.4 ms. Locally (unilayer's load test, raft engine), follower reads at 32 clients went from 32.7k to
34.4k-38.1k req/s. ReadConfirmedByAskerAlone (the two taken for a majority of five) fails 69 of 100 seeds of a leader
and a follower cut off together; the correct protocol passes them.

The changed paths showed a fault in plan 07 (seed 61 of 2,000 of the cluster seeded from restored databases, state
machine safety): a leader took the end of its log, committed already, as the target a rebuilt follower had to reach.
Replaced meanwhile, it counted the follower at once and committed an entry of term 1 over one of term 2. The leader
now appends a no-op when it learns of the rebuild and counts the follower only after committing that without it.
RejoinAtCommittedEnd is the old rule as a mutation; seed 61 fails with it and passes without.

The figure-8 mutation is now caught in 3 of 8,000 seeds (first 1425) against 2 of 2,000 before; its random search
goes to 2,000 seeds, the check itself is unchanged and the script still covers it. Suite: 227 tests green in 64 s;
every simulation at 2,000 seeds green in 7 min 14 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
unilayer/raft!3
No description provided.