This is an automated email from the ASF dual-hosted git repository.
amashenkov pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git
The following commit(s) were added to refs/heads/main by this push:
new 65ed9f692c IGNITE-20755 Do not use join() in
ExecutionServiceImpl#stop() (#2763)
65ed9f692c is described below
commit 65ed9f692c04d255621a2dd9c1de30e247256bda
Author: Roman Puchkovskiy <[email protected]>
AuthorDate: Tue Oct 31 13:14:01 2023 +0400
IGNITE-20755 Do not use join() in ExecutionServiceImpl#stop() (#2763)
---
.../ignite/internal/sql/engine/exec/ExecutionServiceImpl.java | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git
a/modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/ExecutionServiceImpl.java
b/modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/ExecutionServiceImpl.java
index 7c545550a4..1eafd66386 100644
---
a/modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/ExecutionServiceImpl.java
+++
b/modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/ExecutionServiceImpl.java
@@ -32,6 +32,7 @@ import java.util.Map;
import java.util.Objects;
import java.util.Queue;
import java.util.UUID;
+import java.util.concurrent.CancellationException;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
@@ -407,7 +408,13 @@ public class ExecutionServiceImpl<RowT> implements
ExecutionService, TopologyEve
.map(mgr -> mgr.close(true))
.toArray(CompletableFuture[]::new)
);
- f.join();
+
+ try {
+ // Using get() without a timeout to exclude situations when it's
not clear whether the node has actually stopped or not.
+ f.get();
+ } catch (CancellationException e) {
+ LOG.warn("The stop future was cancelled, going to proceed the stop
procedure", e);
+ }
}
/** {@inheritDoc} */