You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by GitBox <gi...@apache.org> on 2021/09/18 03:31:16 UTC

[GitHub] [ratis] kaijchen commented on pull request #500: RATIS-1403. should not change state when request is rejected

kaijchen commented 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 < leader's last log term
   
   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.
   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: issues-unsubscribe@ratis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org