133tosakarin commented on code in PR #13178:
URL: https://github.com/apache/iotdb/pull/13178#discussion_r1721201162


##########
iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/ratis/RatisConsensus.java:
##########
@@ -864,14 +868,30 @@ private RatisClient getRaftClient(RaftGroup group) throws 
ClientManagerException
     }
   }
 
+  private RatisClient getConfigurationRaftClient(RaftGroup group) throws 
ClientManagerException {
+    try {
+      return reconfigurationClientManager.borrowClient(group);
+    } catch (ClientManagerException e) {
+      logger.error("Borrow client from pool for group {} failed.", group, e);
+      // rethrow the exception
+      throw e;
+    }
+  }
+
   private RaftClientReply sendReconfiguration(RaftGroup newGroupConf)
       throws RatisRequestFailedException {
     // notify the group leader of configuration change
     RaftClientReply reply;
-    try (RatisClient client = getRaftClient(newGroupConf)) {
-      reply =
-          client.getRaftClient().admin().setConfiguration(new 
ArrayList<>(newGroupConf.getPeers()));
-      if (!reply.isSuccess()) {
+    try (RatisClient client = getConfigurationRaftClient(newGroupConf)) {
+      while (true) {

Review Comment:
   I think it's no problem,  but i can remove it
   



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