First increment shard stats before notifing and potentially sending response (#25818)
When we skip a shard we should first increment the skip and successful shard counters before we notify the super class about a skipped shard which could send back the result before we increment the stats.
This commit is contained in:
parent
0310a6a947
commit
0d0c103451
|
@ -316,8 +316,8 @@ abstract class AbstractSearchAsyncAction<Result extends SearchPhaseResult> exten
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void skipShard(SearchShardIterator iterator) {
|
protected void skipShard(SearchShardIterator iterator) {
|
||||||
super.skipShard(iterator);
|
|
||||||
successfulOps.incrementAndGet();
|
successfulOps.incrementAndGet();
|
||||||
skippedOps.incrementAndGet();
|
skippedOps.incrementAndGet();
|
||||||
|
super.skipShard(iterator);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue