-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Some cleanups to counting in AbstractSearchAsyncAction #126167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some cleanups to counting in AbstractSearchAsyncAction #126167
Conversation
With batched execution merged, turns out we can inline one single-use method here and deduplicate the counting to zero as well.
Pinging @elastic/es-search-foundations (Team:Search Foundations) |
|
||
private void onShardResultConsumed() { | ||
successfulOps.incrementAndGet(); | ||
// we need to increment successful ops first before we compare the exit condition otherwise if we |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment makes no sense at this point, there is no total ops counter anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice cleanups and consolidating some duplicate code. Just one minor question.
server/src/main/java/org/elasticsearch/action/search/AbstractSearchAsyncAction.java
Show resolved
Hide resolved
Thanks Ben! |
With batched execution merged, turns out we can inline one single-use method here and deduplicate the counting to zero as well.
Also, this removes a completely outdated comment that doesn't apply anymore since we only use the outstanding ops counter.