You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by tl...@apache.org on 2021/04/14 11:25:02 UTC
[ignite] branch sql-calcite updated: Fixes hang query on close
This is an automated email from the ASF dual-hosted git repository.
tledkov pushed a commit to branch sql-calcite
in repository https://gitbox.apache.org/repos/asf/ignite.git
The following commit(s) were added to refs/heads/sql-calcite by this push:
new 643fc31 Fixes hang query on close
643fc31 is described below
commit 643fc31bac2060bec4b207aa13e2b5f61b438d29
Author: zstan <st...@gmail.com>
AuthorDate: Wed Apr 14 14:24:46 2021 +0300
Fixes hang query on close
---
.../internal/processors/query/calcite/exec/rel/RootNode.java | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/rel/RootNode.java b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/rel/RootNode.java
index 8b8838a..9bdda10 100644
--- a/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/rel/RootNode.java
+++ b/modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/rel/RootNode.java
@@ -122,8 +122,16 @@ public class RootNode<Row> extends AbstractNode<Row> implements SingleNode<Row>,
/** {@inheritDoc} */
@Override public void closeInternal() {
+ closeInternal0(ex.get() == null);
+ }
+
+ /** */
+ private void closeInternal0(boolean sync) {
try {
- context().submit(() -> sources().forEach(U::closeQuiet), this::onError).get();
+ if (sync)
+ context().submit(() -> sources().forEach(U::closeQuiet), this::onError).get();
+ else
+ context().execute(() -> sources().forEach(U::closeQuiet), this::onError);
}
catch (InterruptedException | ExecutionException e) {
U.warn(context().planningContext().logger(), "Execution is cancelled.", e);