Skip to content

Commit a6b12b5

Browse files
Don't Swallow Interrupt in TransportService#onRequestReceived (#44622)
* We shouldn't just swallow the interrupt here quietly and keep going on the IO thread * Currently interrupt continues here just the same way an invocation of `acceptIncomingRequests` woudl have made things continue * Relates #44610
1 parent ea1adb6 commit a6b12b5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,8 @@ public void onRequestReceived(long requestId, String action) {
915915
try {
916916
blockIncomingRequestsLatch.await();
917917
} catch (InterruptedException e) {
918-
logger.trace("interrupted while waiting for incoming requests block to be removed");
918+
Thread.currentThread().interrupt();
919+
throw new IllegalStateException("interrupted while waiting for incoming requests block to be removed");
919920
}
920921
if (tracerLog.isTraceEnabled() && shouldTraceAction(action)) {
921922
tracerLog.trace("[{}][{}] received request", requestId, action);

0 commit comments

Comments
 (0)