Skip to content
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

Fix race condition when deleting an async search #53513

Merged
merged 3 commits into from
Mar 12, 2020

Conversation

jimczi
Copy link
Contributor

@jimczi jimczi commented Mar 12, 2020

Deleting an async search id can throw a ResourceNotFoundException even if the query was successfully cancelled.
We delete the stored response automatically if the query is cancelled so that creates a race with the delete action that also ensures that the task is removed. This change ensures that we ignore missing async search ids in the async search index if they were successfully cancelled.

Relates #53360
Relates #49931

Deleting an async search id can throw a ResourceNotFoundException even if the query was successfully cancelled.
We delete the stored response automatically if the query is cancelled so that creates a race with the delete
action that also ensures that the task is removed. This change ensures that we ignore missing async search ids
in the async search index if they were successfuly cancelled.

Relates elastic#53360
Relates elastic#49931
@jimczi jimczi added >non-issue :Search/Search Search-related issues that do not fall into other categories >test-failure Triaged test failures from CI v8.0.0 labels Mar 12, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (:Search/Search)

@jimczi jimczi merged commit 88d05d1 into elastic:master Mar 12, 2020
@jimczi jimczi deleted the async_search_action_delete branch March 12, 2020 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>non-issue :Search/Search Search-related issues that do not fall into other categories >test-failure Triaged test failures from CI v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants