You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When there is an election in Raft, nodes currently send their last_idx to indicate their state. Nodes compare their last_idxs to decide whether to vote for a candidate or not.
This can lead to nodes being elected even though they are further behind. If node (A) is at last_idx 2 but commit_idx 1 and node (B) is at last_idx 2 and commit_idx 2, then node (A) can win an election even though it will immediately after rollback to it's commit_idx 1, leaving the follower ahead of the leader.
This can be fixed by using commit_idx instead of last_idx to vote.
The text was updated successfully, but these errors were encountered:
When there is an election in Raft, nodes currently send their
last_idx
to indicate their state. Nodes compare theirlast_idx
s to decide whether to vote for a candidate or not.This can lead to nodes being elected even though they are further behind. If node (A) is at
last_idx
2 butcommit_idx
1 and node (B) is atlast_idx
2 andcommit_idx
2, then node (A) can win an election even though it will immediately after rollback to it'scommit_idx
1, leaving the follower ahead of the leader.This can be fixed by using
commit_idx
instead oflast_idx
to vote.The text was updated successfully, but these errors were encountered: