szetszwo commented on a change in pull request #144:
URL: https://github.com/apache/incubator-ratis/pull/144#discussion_r467350985
##########
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:
If (state.getCurrentTerm() >= candidateTerm), the server should not vote
it. Why returning false?
Honestly, I don't understand what you are trying to fix. Could you add a
unit test to show it?
----------------------------------------------------------------
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]