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/05 01:34:07 UTC

[GitHub] [iotdb] mychaow commented on a change in pull request #3434: [IOTDB-1399]Add a session interface to connect multiple nodes

mychaow commented on a change in pull request #3434:
URL: https://github.com/apache/iotdb/pull/3434#discussion_r663589845



##########
File path: session/src/main/java/org/apache/iotdb/session/SessionConnection.java
##########
@@ -721,20 +746,28 @@ protected void testInsertTablets(TSInsertTabletsReq request)
 
   private boolean reconnect() {
     boolean flag = false;
-    for (int i = 1; i <= Config.RETRY_NUM; i++) {
-      try {
-        if (transport != null) {
-          close();
-          init(endPoint);
-          flag = true;
+    if (transport != null) {
+      transport.close();
+      int currHostIndex = endPointList.indexOf(session.defaultEndPoint);

Review comment:
       currHostIndex maybe -1, so you should handle 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: reviews-unsubscribe@iotdb.apache.org

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