You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by xi...@apache.org on 2023/04/20 03:29:26 UTC

[iotdb] branch acknowledgeBug1.1 created (now 81edac7a35)

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

xiangweiwei pushed a change to branch acknowledgeBug1.1
in repository https://gitbox.apache.org/repos/asf/iotdb.git


      at 81edac7a35 Fix bug caused by acknowledgeTsBlock

This branch includes the following new commits:

     new 81edac7a35 Fix bug caused by acknowledgeTsBlock

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[iotdb] 01/01: Fix bug caused by acknowledgeTsBlock

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiangweiwei pushed a commit to branch acknowledgeBug1.1
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 81edac7a3580cd25da11196528ccf8e1938adf91
Author: Alima777 <wx...@gmail.com>
AuthorDate: Wed Apr 19 20:08:23 2023 +0800

    Fix bug caused by acknowledgeTsBlock
---
 .../mpp/execution/exchange/sink/SinkChannel.java   | 23 +++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/execution/exchange/sink/SinkChannel.java b/server/src/main/java/org/apache/iotdb/db/mpp/execution/exchange/sink/SinkChannel.java
index af52f610fa..6cdca3f542 100644
--- a/server/src/main/java/org/apache/iotdb/db/mpp/execution/exchange/sink/SinkChannel.java
+++ b/server/src/main/java/org/apache/iotdb/db/mpp/execution/exchange/sink/SinkChannel.java
@@ -327,21 +327,22 @@ public class SinkChannel implements ISinkChannel {
         iterator.remove();
         LOGGER.debug("[ACKTsBlock] {}.", entry.getKey());
       }
+
+      // there may exist duplicate ack message in network caused by caller retrying, if so duplicate
+      // ack message's freedBytes may be zero
+      if (freedBytes > 0) {
+        localMemoryManager
+            .getQueryPool()
+            .free(
+                localFragmentInstanceId.getQueryId(),
+                fullFragmentInstanceId,
+                localPlanNodeId,
+                freedBytes);
+      }
     }
     if (isFinished()) {
       sinkListener.onFinish(this);
     }
-    // there may exist duplicate ack message in network caused by caller retrying, if so duplicate
-    // ack message's freedBytes may be zero
-    if (freedBytes > 0) {
-      localMemoryManager
-          .getQueryPool()
-          .free(
-              localFragmentInstanceId.getQueryId(),
-              fullFragmentInstanceId,
-              localPlanNodeId,
-              freedBytes);
-    }
   }
 
   @Override