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 65a331fcb0e04..e686e55e178a3 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.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.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 synchronized void submit(GridFutureAdapter notificationFut, Runnable cmd) 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; }