Skip to content

Commit 9026c3e

Browse files
authored
Ensure realtime _get and _termvectors don't run on the network thread (#33814)
The change in #27500 introduces this regression that causes `_get` and `_term_vector` actions to run on the network thread if the realtime flag is set. This fixes the issue by delegating to the super method forking on the corresponding threadpool.
1 parent 98ccd94 commit 9026c3e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

server/src/main/java/org/elasticsearch/action/get/TransportGetAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ protected void asyncShardOperation(GetRequest request, ShardId shardId, ActionLi
8181
IndexService indexService = indicesService.indexServiceSafe(shardId.getIndex());
8282
IndexShard indexShard = indexService.getShard(shardId.id());
8383
if (request.realtime()) { // we are not tied to a refresh cycle here anyway
84-
listener.onResponse(shardOperation(request, shardId));
84+
super.asyncShardOperation(request, shardId, listener);
8585
} else {
8686
indexShard.awaitShardSearchActive(b -> {
8787
try {

server/src/main/java/org/elasticsearch/action/termvectors/TransportTermVectorsAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ protected void asyncShardOperation(TermVectorsRequest request, ShardId shardId,
9090
IndexService indexService = indicesService.indexServiceSafe(shardId.getIndex());
9191
IndexShard indexShard = indexService.getShard(shardId.id());
9292
if (request.realtime()) { // it's a realtime request which is not subject to refresh cycles
93-
listener.onResponse(shardOperation(request, shardId));
93+
super.asyncShardOperation(request, shardId, listener);
9494
} else {
9595
indexShard.awaitShardSearchActive(b -> {
9696
try {

0 commit comments

Comments
 (0)