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/07/22 12:33:11 UTC

[GitHub] [ratis] codings-dan opened a new pull request, #692: RATIS-1635. Support listener in MiniRaftCluster

codings-dan opened a new pull request, #692:
URL: https://github.com/apache/ratis/pull/692

   see https://issues.apache.org/jira/browse/RATIS-1635


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


[GitHub] [ratis] codings-dan commented on pull request #692: RATIS-1635. Support listener in MiniRaftCluster

Posted by GitBox <gi...@apache.org>.
codings-dan commented on PR #692:
URL: https://github.com/apache/ratis/pull/692#issuecomment-1192555946

   @szetszwo Could you help review this pull request?  Thank you in advance!


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


[GitHub] [ratis] szetszwo merged pull request #692: RATIS-1635. Support listener in MiniRaftCluster

Posted by GitBox <gi...@apache.org>.
szetszwo merged PR #692:
URL: https://github.com/apache/ratis/pull/692


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


[GitHub] [ratis] codings-dan commented on pull request #692: RATIS-1635. Support listener in MiniRaftCluster

Posted by GitBox <gi...@apache.org>.
codings-dan commented on PR #692:
URL: https://github.com/apache/ratis/pull/692#issuecomment-1193143391

   @szetszwo PTAL, thank you!


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


[GitHub] [ratis] szetszwo commented on a diff in pull request #692: RATIS-1635. Support listener in MiniRaftCluster

Posted by GitBox <gi...@apache.org>.
szetszwo commented on code in PR #692:
URL: https://github.com/apache/ratis/pull/692#discussion_r927817025


##########
ratis-grpc/src/test/java/org/apache/ratis/grpc/MiniRaftClusterWithGrpc.java:
##########
@@ -39,9 +39,9 @@ public class MiniRaftClusterWithGrpc extends MiniRaftCluster.RpcBase {
   public static final Factory<MiniRaftClusterWithGrpc> FACTORY
       = new Factory<MiniRaftClusterWithGrpc>() {
     @Override
-    public MiniRaftClusterWithGrpc newCluster(String[] ids, RaftProperties prop) {
+    public MiniRaftClusterWithGrpc newCluster(String[] ids, String[] ids1, RaftProperties prop) {

Review Comment:
   Rename all ids1 to listenerIds.



##########
ratis-server/src/test/java/org/apache/ratis/server/impl/MiniRaftCluster.java:
##########
@@ -410,11 +441,21 @@ public PeerChanges addNewPeers(int number, boolean startNewPeer)
 
   public PeerChanges addNewPeers(int number, boolean startNewPeer,
       boolean emptyPeer) throws IOException {
-    return addNewPeers(generateIds(number, servers.size()), startNewPeer, emptyPeer);
+    return addNewPeers(generateIds(number, servers.size()), startNewPeer, emptyPeer, false);
   }
 
   public PeerChanges addNewPeers(String[] ids, boolean startNewPeer,
       boolean emptyPeer) throws IOException {
+    return addNewPeers(ids, startNewPeer, emptyPeer, false);
+  }
+
+  public PeerChanges addNewPeers(int number, boolean startNewPeer,
+      boolean emptyPeer, boolean isListener) throws IOException {

Review Comment:
   Similar to other code, pass RaftPeerRole instead of isListener.



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


[GitHub] [ratis] codings-dan commented on a diff in pull request #692: RATIS-1635. Support listener in MiniRaftCluster

Posted by GitBox <gi...@apache.org>.
codings-dan commented on code in PR #692:
URL: https://github.com/apache/ratis/pull/692#discussion_r928135631


##########
ratis-grpc/src/test/java/org/apache/ratis/grpc/MiniRaftClusterWithGrpc.java:
##########
@@ -39,9 +39,9 @@ public class MiniRaftClusterWithGrpc extends MiniRaftCluster.RpcBase {
   public static final Factory<MiniRaftClusterWithGrpc> FACTORY
       = new Factory<MiniRaftClusterWithGrpc>() {
     @Override
-    public MiniRaftClusterWithGrpc newCluster(String[] ids, RaftProperties prop) {
+    public MiniRaftClusterWithGrpc newCluster(String[] ids, String[] ids1, RaftProperties prop) {

Review Comment:
   done.



##########
ratis-server/src/test/java/org/apache/ratis/server/impl/MiniRaftCluster.java:
##########
@@ -410,11 +441,21 @@ public PeerChanges addNewPeers(int number, boolean startNewPeer)
 
   public PeerChanges addNewPeers(int number, boolean startNewPeer,
       boolean emptyPeer) throws IOException {
-    return addNewPeers(generateIds(number, servers.size()), startNewPeer, emptyPeer);
+    return addNewPeers(generateIds(number, servers.size()), startNewPeer, emptyPeer, false);
   }
 
   public PeerChanges addNewPeers(String[] ids, boolean startNewPeer,
       boolean emptyPeer) throws IOException {
+    return addNewPeers(ids, startNewPeer, emptyPeer, false);
+  }
+
+  public PeerChanges addNewPeers(int number, boolean startNewPeer,
+      boolean emptyPeer, boolean isListener) throws IOException {

Review Comment:
   done



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


[GitHub] [ratis] codings-dan commented on pull request #692: RATIS-1635. Support listener in MiniRaftCluster

Posted by GitBox <gi...@apache.org>.
codings-dan commented on PR #692:
URL: https://github.com/apache/ratis/pull/692#issuecomment-1193630783

   @szetszwo Thanks for helping review and merge the pull request!


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