diff --git a/server/src/main/java/org/opensearch/action/support/replication/TransportReplicationAction.java b/server/src/main/java/org/opensearch/action/support/replication/TransportReplicationAction.java index a0f6a5b601198..164e806d04306 100644 --- a/server/src/main/java/org/opensearch/action/support/replication/TransportReplicationAction.java +++ b/server/src/main/java/org/opensearch/action/support/replication/TransportReplicationAction.java @@ -244,7 +244,7 @@ protected TransportReplicationAction( if (threadPool != null) { this.tcWrapper = InternalThreadContextWrapper.from(threadPool.getThreadContext()); } else { - this.tcWrapper = InternalThreadContextWrapper.from(transportSeervice.threadPool.getThreadContext()); + this.tcWrapper = InternalThreadContextWrapper.from(transportService.getThreadPool().getThreadContext()); } this.transportService = transportService; this.clusterService = clusterService;