Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down