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

xingtanzjr pushed a commit to branch xingtanzjr/0511_test
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 6c4676fc1ffb084a091070a0a0ec780924a5e026
Author: Jinrui.Zhang <[email protected]>
AuthorDate: Wed May 11 21:28:05 2022 +0800

    tmp save
---
 .../java/org/apache/iotdb/db/mpp/plan/execution/QueryExecution.java   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/QueryExecution.java
 
b/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/QueryExecution.java
index 0e5da23ad1..257559527c 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/QueryExecution.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/QueryExecution.java
@@ -236,7 +236,9 @@ public class QueryExecution implements IQueryExecution {
     // There are only two scenarios where the ResultHandle should be closed:
     //   1. The client fetch all the result and the ResultHandle is finished.
     //   2. The client's connection is closed that all owned QueryExecution 
should be cleaned up
-    if (resultHandle != null && resultHandle.isFinished()) {
+    // If the QueryExecution's state is abnormal, we should also abort the 
resultHandle without
+    // waiting it to be finished.
+    if (resultHandle != null) {
       resultHandle.abort();
     }
   }

Reply via email to