You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ja...@apache.org on 2022/05/11 13:27:57 UTC

[iotdb] branch BrokenPipe updated: add more message

This is an automated email from the ASF dual-hosted git repository.

jackietien pushed a commit to branch BrokenPipe
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/BrokenPipe by this push:
     new 679c5b5793 add more message
679c5b5793 is described below

commit 679c5b5793a109a58afb45360ed113d4511e861f
Author: JackieTien97 <ja...@gmail.com>
AuthorDate: Wed May 11 21:27:48 2022 +0800

    add more message
---
 .../sync/SyncThriftClientWithErrorHandler.java      | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/node-commons/src/main/java/org/apache/iotdb/commons/client/sync/SyncThriftClientWithErrorHandler.java b/node-commons/src/main/java/org/apache/iotdb/commons/client/sync/SyncThriftClientWithErrorHandler.java
index 09a2a00946..f710300c85 100644
--- a/node-commons/src/main/java/org/apache/iotdb/commons/client/sync/SyncThriftClientWithErrorHandler.java
+++ b/node-commons/src/main/java/org/apache/iotdb/commons/client/sync/SyncThriftClientWithErrorHandler.java
@@ -54,9 +54,24 @@ public class SyncThriftClientWithErrorHandler implements MethodInterceptor {
       return methodProxy.invokeSuper(o, objects);
     } catch (InvocationTargetException e) {
       if (e.getTargetException() instanceof TException) {
+        Throwable t = e.getTargetException();
+        int level = 0;
+        while (t != null) {
+          LOGGER.error(
+              "level-{} Exception class {}, message {}",
+              level,
+              t.getClass().getName(),
+              t.getMessage());
+          t = t.getCause();
+        }
         Throwable rootCause = ExceptionUtils.getRootCause(e);
         // if the exception is SocketException and its error message is Broken pipe, it means that
         // the remote node may restart and all the connection we cached before should be cleared.
+        LOGGER.error(
+            "root cause message {}, LocalizedMessage {}, ",
+            rootCause.getMessage(),
+            rootCause.getLocalizedMessage(),
+            rootCause);
         if (rootCause instanceof SocketException
             && rootCause.getMessage().contains("Broken pipe")) {
           LOGGER.error(
@@ -67,13 +82,13 @@ public class SyncThriftClientWithErrorHandler implements MethodInterceptor {
           ((SyncThriftClient) o).invalidateAll();
         } else {
           LOGGER.error(
-              "Error in calling method {}, err: {}", method.getName(), e.getTargetException());
+              "Error in calling method1 {}, err: {}", method.getName(), e.getTargetException());
           ((SyncThriftClient) o).invalidate();
         }
       }
-      throw new TException("Error in calling method " + method.getName(), e.getTargetException());
+      throw new TException("Error in calling method2 " + method.getName(), e.getTargetException());
     } catch (Exception e) {
-      throw new TException("Error in calling method " + method.getName(), e);
+      throw new TException("Error in calling method3 " + method.getName(), e);
     }
   }
 }