mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 01:22:26 -04:00
transport: edit TransportConnectionListener for close exceptions (#129015)
The TransportConnectionListener interface has previously included the Transport.Connection being closed and unregistered in its onNodeDisconnected callback. This is not in use, and can be removed as it is also available in the onConnectionClosed callback. It is being replaced with a Nullable exception that caused the close. This is being used in pending work (ES-11448) to differentiate network issues from node restarts. Closes ES-12007
This commit is contained in:
parent
aceaf23130
commit
ee716f11b9
11 changed files with 42 additions and 23 deletions
|
@ -202,7 +202,7 @@ public abstract class AbstractSimpleTransportTestCase extends ESTestCase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onNodeDisconnected(DiscoveryNode node, Transport.Connection connection) {
|
||||
public void onNodeDisconnected(DiscoveryNode node, @Nullable Exception closeException) {
|
||||
fail("disconnect should not be called " + node);
|
||||
}
|
||||
};
|
||||
|
@ -924,7 +924,7 @@ public abstract class AbstractSimpleTransportTestCase extends ESTestCase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onNodeDisconnected(DiscoveryNode node, Transport.Connection connection) {
|
||||
public void onNodeDisconnected(DiscoveryNode node, @Nullable Exception closeException) {
|
||||
latch.countDown();
|
||||
}
|
||||
};
|
||||
|
@ -2118,7 +2118,7 @@ public abstract class AbstractSimpleTransportTestCase extends ESTestCase {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onNodeDisconnected(DiscoveryNode node, Transport.Connection connection) {
|
||||
public void onNodeDisconnected(DiscoveryNode node, @Nullable Exception closeException) {
|
||||
fail("disconnect should not be called " + node);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue