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 2022/07/20 11:14:38 UTC

[iotdb] branch xingtanzjr/query_retry_condition updated: fix the issue that query return false status when retrying

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

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


The following commit(s) were added to refs/heads/xingtanzjr/query_retry_condition by this push:
     new 7cf673dcc9 fix the issue that query return false status when retrying
7cf673dcc9 is described below

commit 7cf673dcc9089cb618e552f7e2e8e816ddc50dfc
Author: Jinrui.Zhang <xi...@gmail.com>
AuthorDate: Wed Jul 20 19:14:28 2022 +0800

    fix the issue that query return false status when retrying
---
 .../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 9c9d290052..e20b06da79 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
@@ -454,7 +454,9 @@ public class QueryExecution implements IQueryExecution {
 
     TSStatus tsstatus = RpcUtils.getStatus(statusCode, stateMachine.getFailureMessage());
 
-    if (stateMachine.getFailureStatus() != null) {
+    // If RETRYING is triggered by this QueryExecution, the stateMachine.getFailureStatus()
+    // is also not null. And in this situation, we should return the failure status.
+    if (state.isDone() && stateMachine.getFailureStatus() != null) {
       tsstatus = stateMachine.getFailureStatus();
     }