You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/07/13 01:11:55 UTC

[GitHub] [iotdb] neuyilan commented on a change in pull request #3538: [To rel/0.12][IOTDB-1488] Fix metaMember's forwarding clientPool timeout in cluster module

neuyilan commented on a change in pull request #3538:
URL: https://github.com/apache/iotdb/pull/3538#discussion_r668356202



##########
File path: cluster/src/main/java/org/apache/iotdb/cluster/server/member/MetaGroupMember.java
##########
@@ -460,6 +481,57 @@ private void threadTaskInit() {
         CLEAN_HARDLINK_INTERVAL_SEC,
         CLEAN_HARDLINK_INTERVAL_SEC,
         TimeUnit.SECONDS);
+    dataClientRefresher.scheduleAtFixedRate(
+        this::refreshClientOnce, REFRESH_CLIENT_SEC, REFRESH_CLIENT_SEC, TimeUnit.SECONDS);
+  }
+
+  private void refreshClientOnce() {
+    for (Node receiver : allNodes) {
+      if (!receiver.equals(thisNode)) {
+        if (ClusterDescriptor.getInstance().getConfig().isUseAsyncServer()) {
+          refreshClientOnceAsync(receiver);
+        } else {
+          refreshClientOnceSync(receiver);
+        }
+      }
+    }
+  }

Review comment:
       Good job.
   But I have some issues,  I think the `refreshClientOnce` can not **refresh** all clients in the client pool, because for one node receiver, there will be some clients, so this method can just fresh one client for one receiver node? for example, if the receiver node1 has 5 clients in the client pool, this method can only refresh one client, the other 4 clients can not be refreshed.




-- 
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: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org