You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by zy...@apache.org on 2023/03/15 01:14:58 UTC

[iotdb] 04/06: [To rel/1.1] change log in ShuffleSinkHandle

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

zyk pushed a commit to branch rc/1.1.0
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 17bb550aa477c9e115afbdfe84752c339bcaea64
Author: Liao Lanyu <14...@qq.com>
AuthorDate: Tue Mar 14 18:00:38 2023 +0800

    [To rel/1.1] change log in ShuffleSinkHandle
---
 .../execution/exchange/sink/ShuffleSinkHandle.java   | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/execution/exchange/sink/ShuffleSinkHandle.java b/server/src/main/java/org/apache/iotdb/db/mpp/execution/exchange/sink/ShuffleSinkHandle.java
index 9b18f4f771..12a438d845 100644
--- a/server/src/main/java/org/apache/iotdb/db/mpp/execution/exchange/sink/ShuffleSinkHandle.java
+++ b/server/src/main/java/org/apache/iotdb/db/mpp/execution/exchange/sink/ShuffleSinkHandle.java
@@ -162,13 +162,21 @@ public class ShuffleSinkHandle implements ISinkHandle {
       return;
     }
     LOGGER.debug("[StartAbortShuffleSinkHandle]");
+    boolean meetError = false;
+    Exception firstException = null;
     for (ISink channel : downStreamChannelList) {
       try {
         channel.abort();
       } catch (Exception e) {
-        LOGGER.warn("Error occurred when try to abort channel.");
+        if (!meetError) {
+          firstException = e;
+          meetError = true;
+        }
       }
     }
+    if (meetError) {
+      LOGGER.warn("Error occurred when try to abort channel.", firstException);
+    }
     aborted = true;
     sinkListener.onAborted(this);
     LOGGER.debug("[EndAbortShuffleSinkHandle]");
@@ -180,13 +188,21 @@ public class ShuffleSinkHandle implements ISinkHandle {
       return;
     }
     LOGGER.debug("[StartCloseShuffleSinkHandle]");
+    boolean meetError = false;
+    Exception firstException = null;
     for (ISink channel : downStreamChannelList) {
       try {
         channel.close();
       } catch (Exception e) {
-        LOGGER.warn("Error occurred when try to abort channel.");
+        if (!meetError) {
+          firstException = e;
+          meetError = true;
+        }
       }
     }
+    if (meetError) {
+      LOGGER.warn("Error occurred when try to close channel.", firstException);
+    }
     closed = true;
     sinkListener.onFinish(this);
     LOGGER.debug("[EndCloseShuffleSinkHandle]");