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 2022/09/07 14:10:15 UTC

[GitHub] [ratis] szetszwo commented on a diff in pull request #737: RATIS-1698. Add unit-test of listener related to leaderElection

szetszwo commented on code in PR #737:
URL: https://github.com/apache/ratis/pull/737#discussion_r964886097


##########
ratis-server/src/main/java/org/apache/ratis/server/impl/PeerConfiguration.java:
##########
@@ -157,6 +157,10 @@ boolean hasMajority(Collection<RaftPeerId> others, RaftPeerId selfId) {
     return num > size() / 2;
   }
 
+  long getMajorityCount() {

Review Comment:
   Use `int`.



##########
ratis-server/src/main/java/org/apache/ratis/server/impl/RaftConfigurationImpl.java:
##########
@@ -231,6 +231,10 @@ boolean hasMajority(Collection<RaftPeerId> others, RaftPeerId selfId) {
         (oldConf == null || oldConf.hasMajority(others, selfId));
   }
 
+  long getMajorityCount() {

Review Comment:
   Use `int`.



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