amaliujia commented on a change in pull request #213:
URL: https://github.com/apache/incubator-ratis/pull/213#discussion_r501248797



##########
File path: 
ratis-server/src/main/java/org/apache/ratis/server/DataStreamServerRpc.java
##########
@@ -27,6 +27,11 @@
    */
   void startServer();
 
+  /**
+   * start clients that used to forward requests to peers.
+   */
+  void startClientToPeers();

Review comment:
       `startServer` is to start the stream server.  `startClientToPeers` means 
to build connections with other stream servers, which implies that other stream 
servers must be called `startServer` firstly.
   
   That's why I cannot call `startClientToPeers` in `startServer` because other 
stream servers might not start.
   
   Alternatively, we could lazy initialize the clients to peers, by checking 
whether connection is built when having first request. But I am not sure 
whether this is a good idea.
   
    `startServer` can be called without calling `startClientToPeers` 
afterwards, which means that this stream will not forward message to peers.




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


Reply via email to