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:
Simon Willnauer 2017-07-21 08:46:10 +02:00 committed by GitHub
parent 0310a6a947
commit 0d0c103451
1 changed files with 1 additions and 1 deletions

View File

@ -316,8 +316,8 @@ abstract class AbstractSearchAsyncAction<Result extends SearchPhaseResult> exten
@Override
protected void skipShard(SearchShardIterator iterator) {
super.skipShard(iterator);
successfulOps.incrementAndGet();
skippedOps.incrementAndGet();
super.skipShard(iterator);
}
}