kaijchen edited a comment on pull request #500:
URL: https://github.com/apache/ratis/pull/500#issuecomment-922171562


   > can you give a case that a candidate has a higher 
term(recognizeCandidate(candidateTerm) != null), but decideVote(..) still 
returns false?
   
   1. candidate's term >  leader's term
   2. candidate's last log (term, index) < leader's last log (term, index)
   
   Leader should reject the VoteFor request, and step down.
   
   We can see the etcd's implementation for reference. Note in Go, the 
switch-case doesn't fallthrough by default.
   
https://github.com/etcd-io/etcd/blob/706f256a054b2158ba5dc2e59cbab45826063829/raft/raft.go#L847


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to