Fix sporadic failures in AsyncSearchAsyncTests#53375
Merged
jimczi merged 9 commits intoelastic:masterfrom Mar 11, 2020
Merged
Conversation
Shard group failure callbacks should be executed before incrementing the total operations. This is required to ensure that we don't notify a shard group failure **after** the completion callback.
This change ensures that we set the isRunning flag to `false` when storing the initial response of an async search request.
Collaborator
|
Pinging @elastic/es-search (:Search/Search) |
javanna
reviewed
Mar 11, 2020
...lugin/core/src/main/java/org/elasticsearch/xpack/core/search/action/AsyncSearchResponse.java
Outdated
Show resolved
Hide resolved
| final String docId = searchTask.getSearchId().getDocId(); | ||
| store.storeInitialResponse(docId, searchTask.getOriginHeaders(), searchResponse, | ||
| // creates the fallback response if the node crashes/restarts in the middle of the request | ||
| // TODO: store intermediate results ? |
Contributor
There was a problem hiding this comment.
can you elaborate on this TODO? does it revolve around resiliency?
Contributor
Author
There was a problem hiding this comment.
It does, yes that's one of the follow up question we have in the meta issue.
Contributor
There was a problem hiding this comment.
I thought so, I wonder if we need the TODO in the code then, cause we are tracking this anyways elsewhere.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change fixes a race condition in shard group failure callbacks and ensures that we set the correct flag on initial stored responses.
Relates #49931
Closes #53360