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 2021/04/28 09:19:46 UTC

[GitHub] [ratis] szetszwo commented on a change in pull request #474: RATIS-1371. Support multi-client when transfer data between servers

szetszwo commented on a change in pull request #474:
URL: https://github.com/apache/ratis/pull/474#discussion_r621978992



##########
File path: ratis-server-api/src/main/java/org/apache/ratis/server/RaftServerConfigKeys.java
##########
@@ -445,6 +445,19 @@ static int asyncWriteThreadPoolSize(RaftProperties properties) {
     static void setAsyncWriteThreadPoolSize(RaftProperties properties, int port) {
       setInt(properties::setInt, ASYNC_WRITE_THREAD_POOL_SIZE_KEY, port);
     }
+
+    String CLIENT_NUM_KEY = PREFIX + ".client.number";

Review comment:
       Let's call it "client.pool.size".

##########
File path: ratis-netty/src/main/java/org/apache/ratis/netty/server/NettyServerStreamRpc.java
##########
@@ -109,17 +111,22 @@ void close() {
   private final EventLoopGroup bossGroup = new NioEventLoopGroup();
   private final EventLoopGroup workerGroup = new NioEventLoopGroup();
   private final ChannelFuture channelFuture;
+  private final int clientNum;

Review comment:
       I think we can declare clientNum (or rename it to clientPoolSize) as a local variable in the constructor and use proxies.size() elsewhere.  Then, we don't need this field.




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