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 2020/10/12 11:32:18 UTC

[GitHub] [iotdb] neuyilan commented on a change in pull request #1821: Add session retry

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



##########
File path: session/src/main/java/org/apache/iotdb/session/Session.java
##########
@@ -239,7 +244,15 @@ public void insertTablet(Tablet tablet, boolean sorted)
     try {
       RpcUtils.verifySuccess(client.insertTablet(request));
     } catch (TException e) {
-      throw new IoTDBConnectionException(e);
+      if (reconnect()) {

Review comment:
       The reconnect() method will call the open() method again, would this cause an infinite loop?
   If the open fails, I think we can just throw an exception, as next time the insert request came can call the reconnect() method.




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