You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by al...@apache.org on 2026/05/29 06:55:14 UTC

(ignite) branch master updated: IGNITE-28709 SQL Calcite: Fix flaky CancelTest.testNotOriginatorNodeStop (#13168)

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

alex-plekhanov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
     new b4349cb0538 IGNITE-28709 SQL Calcite: Fix flaky CancelTest.testNotOriginatorNodeStop (#13168)
b4349cb0538 is described below

commit b4349cb053847efb8f1f32449452db3bcee87463
Author: Aleksey Plekhanov <Pl...@gmail.com>
AuthorDate: Fri May 29 09:55:07 2026 +0300

    IGNITE-28709 SQL Calcite: Fix flaky CancelTest.testNotOriginatorNodeStop (#13168)
---
 .../processors/query/calcite/exec/ExecutionServiceImpl.java         | 5 ++++-
 .../apache/ignite/internal/processors/query/calcite/CancelTest.java | 6 +++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionServiceImpl.java b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionServiceImpl.java
index f0207a65a1d..19fbeadb463 100644
--- a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionServiceImpl.java
+++ b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionServiceImpl.java
@@ -980,7 +980,10 @@ public class ExecutionServiceImpl<Row> extends AbstractService implements Execut
                 U.error(log, "Error occurred during send error message: " + X.getFullStackTrace(e));
             }
             finally {
-                qryReg.query(msg.queryId()).onError(ex);
+                Query<?> qry = qryReg.query(msg.queryId());
+
+                if (qry != null)
+                    qry.onError(ex);
             }
         }
     }
diff --git a/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/CancelTest.java b/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/CancelTest.java
index c57f4ff77b5..da4dfdd1d87 100644
--- a/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/CancelTest.java
+++ b/modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/CancelTest.java
@@ -142,8 +142,12 @@ public class CancelTest extends GridCommonAbstractTest {
         // Sometimes remote node during stopping can send error to originator node and this error processed before
         // node left event, in this case exception stack will looks like:
         // IgniteSQLException -> RemoteException -> exception on remote node during node stop.
+        // Also, remote node can be stopped during processing of QueryStartRequest, in this case QueryCloseRequest
+        // with an error will be sent to originator node, this causes query cancelation with an IgniteSQLException.
         if (!X.hasCause(ex, "node left", ClusterTopologyCheckedException.class) &&
-            !X.hasCause(ex, RemoteException.class)) {
+            !X.hasCause(ex, RemoteException.class) &&
+            !X.hasCause(ex, "The query was cancelled while executing", IgniteSQLException.class)
+        ) {
             log.error("Unexpected exception", ex);
 
             fail("Unexpected exception: " + ex);