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

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


The following commit(s) were added to refs/heads/master by this push:
     new 0cb79e5f07e [IoTDB-6172] Finish canAddTsBlock of SharedTsBlockQueue to 
ensure that blocked Driver could be correctly finished
0cb79e5f07e is described below

commit 0cb79e5f07eabad9e748f0b160352cc4c79e33d6
Author: Liao Lanyu <[email protected]>
AuthorDate: Tue Sep 26 22:05:18 2023 +0800

    [IoTDB-6172] Finish canAddTsBlock of SharedTsBlockQueue to ensure that 
blocked Driver could be correctly finished
---
 .../db/queryengine/execution/exchange/SharedTsBlockQueue.java    | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/SharedTsBlockQueue.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/SharedTsBlockQueue.java
index 8ed23f325b1..46528361c20 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/SharedTsBlockQueue.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/exchange/SharedTsBlockQueue.java
@@ -269,6 +269,9 @@ public class SharedTsBlockQueue {
     if (!blocked.isDone()) {
       blocked.set(null);
     }
+    if (!canAddTsBlock.isDone()) {
+      canAddTsBlock.set(null);
+    }
     if (blockedOnMemory != null) {
       bufferRetainedSizeInBytes -= 
localMemoryManager.getQueryPool().tryCancel(blockedOnMemory);
     }
@@ -305,6 +308,9 @@ public class SharedTsBlockQueue {
     if (!blocked.isDone()) {
       blocked.cancel(true);
     }
+    if (!canAddTsBlock.isDone()) {
+      canAddTsBlock.set(null);
+    }
     if (blockedOnMemory != null) {
       bufferRetainedSizeInBytes -= 
localMemoryManager.getQueryPool().tryCancel(blockedOnMemory);
     }
@@ -330,6 +336,9 @@ public class SharedTsBlockQueue {
     if (!blocked.isDone()) {
       blocked.setException(t);
     }
+    if (!canAddTsBlock.isDone()) {
+      canAddTsBlock.set(null);
+    }
     if (blockedOnMemory != null) {
       bufferRetainedSizeInBytes -= 
localMemoryManager.getQueryPool().tryCancel(blockedOnMemory);
     }

Reply via email to