From 83f1c1f83353279c69215174c6809b9d29f88794 Mon Sep 17 00:00:00 2001 From: David Turner Date: Fri, 6 Oct 2023 14:03:49 +0100 Subject: [PATCH] Fix nonforking fast path in InboundHandler (#100389) (#100398) Fixes an equality check missed in #98854. --- .../main/java/org/elasticsearch/transport/InboundHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/main/java/org/elasticsearch/transport/InboundHandler.java b/server/src/main/java/org/elasticsearch/transport/InboundHandler.java index 171f693905b61..5d47c79abfd61 100644 --- a/server/src/main/java/org/elasticsearch/transport/InboundHandler.java +++ b/server/src/main/java/org/elasticsearch/transport/InboundHandler.java @@ -268,7 +268,7 @@ private void handleRequest(TcpChannel channel, Inbo assert requestId > 0; request.setRequestId(requestId); verifyRequestReadFully(stream, requestId, action); - if (ThreadPool.Names.SAME.equals(reg.getExecutor())) { + if (reg.getExecutor() == EsExecutors.DIRECT_EXECUTOR_SERVICE) { try (var ignored = threadPool.getThreadContext().newTraceContext()) { doHandleRequest(reg, request, transportChannel); }