qian0817 commented on code in PR #673:
URL: https://github.com/apache/ratis/pull/673#discussion_r917827211


##########
ratis-common/src/main/java/org/apache/ratis/protocol/RaftPeer.java:
##########
@@ -75,6 +77,7 @@ public static class Builder {
     private String clientAddress;
     private String dataStreamAddress;
     private int priority;
+    private RaftProtos.RaftPeerRole startupRole;

Review Comment:
   fix.



##########
ratis-common/src/main/java/org/apache/ratis/protocol/RaftGroup.java:
##########
@@ -75,6 +77,13 @@ public Collection<RaftPeer> getPeers() {
     return peers.values();
   }
 
+  public Collection<RaftPeer> getPeers(RaftProtos.RaftPeerRole role) {
+    return peers.values()
+        .stream()
+        .filter(peer -> peer.getStartupRole() == role)

Review Comment:
   fix.



-- 
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: [email protected]

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

Reply via email to