mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-18 19:05:06 +00:00
Merge pull request #15212 from ywelsch/fix/rejectedexecution-on-shutdown
Ignore RejectedExecutionException in NodesFaultDetection
This commit is contained in:
commit
1905f495bf
@ -26,6 +26,7 @@ import org.elasticsearch.common.io.stream.StreamInput;
|
|||||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||||
import org.elasticsearch.common.settings.Settings;
|
import org.elasticsearch.common.settings.Settings;
|
||||||
import org.elasticsearch.common.unit.TimeValue;
|
import org.elasticsearch.common.unit.TimeValue;
|
||||||
|
import org.elasticsearch.common.util.concurrent.EsRejectedExecutionException;
|
||||||
import org.elasticsearch.threadpool.ThreadPool;
|
import org.elasticsearch.threadpool.ThreadPool;
|
||||||
import org.elasticsearch.transport.*;
|
import org.elasticsearch.transport.*;
|
||||||
|
|
||||||
@ -145,6 +146,7 @@ public class NodesFaultDetection extends FaultDetection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void notifyNodeFailure(final DiscoveryNode node, final String reason) {
|
private void notifyNodeFailure(final DiscoveryNode node, final String reason) {
|
||||||
|
try {
|
||||||
threadPool.generic().execute(new Runnable() {
|
threadPool.generic().execute(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@ -153,6 +155,9 @@ public class NodesFaultDetection extends FaultDetection {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} catch (EsRejectedExecutionException ex) {
|
||||||
|
logger.trace("[node ] [{}] ignoring node failure (reason [{}]). Local node is shutting down", ex, node, reason);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void notifyPingReceived(final PingRequest pingRequest) {
|
private void notifyPingReceived(final PingRequest pingRequest) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user