You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ratis.apache.org by GitBox <gi...@apache.org> on 2020/11/04 01:07:43 UTC

[GitHub] [incubator-ratis] dengziming commented on a change in pull request #241: RATIS-1120. Terminate election in advance if majority peers reject

dengziming commented on a change in pull request #241:
URL: https://github.com/apache/incubator-ratis/pull/241#discussion_r517042470



##########
File path: ratis-server/src/main/java/org/apache/ratis/server/impl/PeerConfiguration.java
##########
@@ -94,6 +94,16 @@ boolean hasMajority(Collection<RaftPeerId> others, RaftPeerId selfId) {
     return num > size() / 2;
   }
 
+  boolean majorityImpossibleWithout(Collection<RaftPeerId> rejected) {

Review comment:
       OK, firstly I assume rejected votes is not necessarily a majority, maybe half is enough. But I think majorityRejectVote is more self-explanatory even it is not very accurate.




----------------------------------------------------------------
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:
users@infra.apache.org