You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by se...@apache.org on 2020/12/11 09:20:58 UTC
[ignite] branch master updated: IGNITE-13832 Proper handling of
interrupted exceptions in disco-notifier-worker. - Fixes #8561.
This is an automated email from the ASF dual-hosted git repository.
sergeychugunov 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 f48f31e IGNITE-13832 Proper handling of interrupted exceptions in disco-notifier-worker. - Fixes #8561.
f48f31e is described below
commit f48f31e4c73841549cef499dbd35cceee91c8032
Author: ibessonov <be...@gmail.com>
AuthorDate: Fri Dec 11 11:50:48 2020 +0300
IGNITE-13832 Proper handling of interrupted exceptions in disco-notifier-worker. - Fixes #8561.
Signed-off-by: Sergey Chugunov <se...@gmail.com>
---
.../managers/discovery/GridDiscoveryManager.java | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
index 65a331f..e686e55 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
@@ -37,7 +37,6 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
-
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.IgniteClientDisconnectedException;
import org.apache.ignite.IgniteException;
@@ -101,6 +100,7 @@ import org.apache.ignite.internal.util.typedef.CI1;
import org.apache.ignite.internal.util.typedef.F;
import org.apache.ignite.internal.util.typedef.P1;
import org.apache.ignite.internal.util.typedef.T2;
+import org.apache.ignite.internal.util.typedef.X;
import org.apache.ignite.internal.util.typedef.internal.CU;
import org.apache.ignite.internal.util.typedef.internal.LT;
import org.apache.ignite.internal.util.typedef.internal.S;
@@ -2740,18 +2740,19 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
try {
body0();
}
- catch (InterruptedException e) {
- if (!isCancelled)
- ctx.failure().process(new FailureContext(SYSTEM_WORKER_TERMINATION, e));
-
- throw e;
- }
catch (Throwable t) {
- U.error(log, "Exception in discovery notyfier worker thread.", t);
+ boolean isInterruptedException = X.hasCause(t, InterruptedException.class)
+ || X.hasCause(t, IgniteInterruptedException.class)
+ || X.hasCause(t, IgniteInterruptedCheckedException.class);
- FailureType type = t instanceof OutOfMemoryError ? CRITICAL_ERROR : SYSTEM_WORKER_TERMINATION;
+ if (!isInterruptedException)
+ U.error(log, "Exception in discovery notifier worker thread.", t);
- ctx.failure().process(new FailureContext(type, t));
+ if (!isInterruptedException || !isCancelled) {
+ FailureType type = t instanceof OutOfMemoryError ? CRITICAL_ERROR : SYSTEM_WORKER_TERMINATION;
+
+ ctx.failure().process(new FailureContext(type, t));
+ }
throw t;
}