GlenGeng commented on a change in pull request #144:
URL: https://github.com/apache/incubator-ratis/pull/144#discussion_r467367859
##########
File path:
ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerImpl.java
##########
@@ -785,7 +785,7 @@ public RaftClientReply
setConfiguration(SetConfigurationRequest request) throws
}
private boolean shouldWithholdVotes(long candidateTerm) {
- if (state.getCurrentTerm() < candidateTerm) {
+ if (state.getCurrentTerm() >= candidateTerm) {
Review comment:
the key point here is, voting should only depends on voterFor and
currentTerm, whose correctness is proved formally
<img width="405" alt="截屏2020-08-08 下午1 59 32"
src="https://user-images.githubusercontent.com/8412672/89703749-349d8080-d980-11ea-9730-89c71f1f6480.png">
Voting that depends on role and requestTime/responseTime is not a
theoretically proved way.
----------------------------------------------------------------
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]