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.
This commit is contained in:
parent
98ccd94962
commit
9026c3ee92
|
@ -81,7 +81,7 @@ public class TransportGetAction extends TransportSingleShardAction<GetRequest, G
|
||||||
IndexService indexService = indicesService.indexServiceSafe(shardId.getIndex());
|
IndexService indexService = indicesService.indexServiceSafe(shardId.getIndex());
|
||||||
IndexShard indexShard = indexService.getShard(shardId.id());
|
IndexShard indexShard = indexService.getShard(shardId.id());
|
||||||
if (request.realtime()) { // we are not tied to a refresh cycle here anyway
|
if (request.realtime()) { // we are not tied to a refresh cycle here anyway
|
||||||
listener.onResponse(shardOperation(request, shardId));
|
super.asyncShardOperation(request, shardId, listener);
|
||||||
} else {
|
} else {
|
||||||
indexShard.awaitShardSearchActive(b -> {
|
indexShard.awaitShardSearchActive(b -> {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -90,7 +90,7 @@ public class TransportTermVectorsAction extends TransportSingleShardAction<TermV
|
||||||
IndexService indexService = indicesService.indexServiceSafe(shardId.getIndex());
|
IndexService indexService = indicesService.indexServiceSafe(shardId.getIndex());
|
||||||
IndexShard indexShard = indexService.getShard(shardId.id());
|
IndexShard indexShard = indexService.getShard(shardId.id());
|
||||||
if (request.realtime()) { // it's a realtime request which is not subject to refresh cycles
|
if (request.realtime()) { // it's a realtime request which is not subject to refresh cycles
|
||||||
listener.onResponse(shardOperation(request, shardId));
|
super.asyncShardOperation(request, shardId, listener);
|
||||||
} else {
|
} else {
|
||||||
indexShard.awaitShardSearchActive(b -> {
|
indexShard.awaitShardSearchActive(b -> {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue