Follower should not vote if Candidate has out-of-date log
Closed this issue · 1 comments
colin-scott commented
The raft paper states that a node should only grant a vote to a Candidate if two conditions hold:
- the follower hasn't already voted in its current Term (checked here)
- The candidate’s log is at least as up-to-date as receiver’s log
The second condition is not currently checked by either the Follower or the Candidate states. In other words, the "lastLogIndex" and "lasLogTerm" fields of the RequestVote message are never read.
colin-scott commented
Oops, duplicate of #30