runzhiwang commented on pull request #161:
URL: https://github.com/apache/incubator-ratis/pull/161#issuecomment-755273565


   > There are quite many code duplications between pre-vote and vote. We may 
refactor the code here or in a separated JIRA.
   
   @szetszwo Thanks for review. I will refactor the code in next PR. 
   
   Besides, when s1 transferLeaderShip to s2,  s2 should skip askForPreVote, 
and askForVote directly. Because when s2 askForPreVote, s1 and s3 will reject 
it because current leader is still valid. So I add a flag: LeaderElection#force 
which means we should skip askForPreVote and askForVote directly, this flag 
will be true when s2 receive StartLeaderElectionRequest.


----------------------------------------------------------------
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.

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


Reply via email to