Skip to content

Commit e205ad2

Browse files
committed
add assertion for debugging purposes
1 parent 1b7eeb4 commit e205ad2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

server/src/main/java/org/elasticsearch/transport/RemoteClusterConnection.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,7 @@ void collectRemoteNodes(Iterator<DiscoveryNode> seedNodes,
450450
// due to an already closed connection.
451451
ThreadPool threadPool = transportService.getThreadPool();
452452
ThreadContext threadContext = threadPool.getThreadContext();
453+
assert threadContext.isSystemContext() == false : "context is a system context";
453454
TransportService.ContextRestoreResponseHandler<ClusterStateResponse> responseHandler = new TransportService
454455
.ContextRestoreResponseHandler<>(threadContext.newRestorableContext(false),
455456
new SniffClusterStateResponseHandler(transportService, connection, listener, seedNodes,

0 commit comments

Comments
 (0)