If a node client (or rather its underlying node) is closed then any executions on it will just quietly fail as happens in #55660 via closing the nodes on the test thread and asynchronously using a node client. Closes #55660
This commit is contained in:
parent
3b211c1212
commit
f38385ee25
|
@ -747,9 +747,11 @@ public class TransportService extends AbstractLifecycleComponent implements Repo
|
|||
timeoutHandler.cancel();
|
||||
}
|
||||
// callback that an exception happened, but on a different thread since we don't
|
||||
// want handlers to worry about stack overflows
|
||||
// want handlers to worry about stack overflows. In the special case of running into a closing node we run on the current
|
||||
// thread on a best effort basis though.
|
||||
final SendRequestTransportException sendRequestException = new SendRequestTransportException(node, action, e);
|
||||
threadPool.executor(ThreadPool.Names.GENERIC).execute(new AbstractRunnable() {
|
||||
final String executor = lifecycle.stoppedOrClosed() ? ThreadPool.Names.SAME : ThreadPool.Names.GENERIC;
|
||||
threadPool.executor(executor).execute(new AbstractRunnable() {
|
||||
@Override
|
||||
public void onRejection(Exception e) {
|
||||
// if we get rejected during node shutdown we don't wanna bubble it up
|
||||
|
|
Loading…
Reference in New Issue