Skip to content

Fix race condition when deleting an async search#53513

Merged
jimczi merged 3 commits intoelastic:masterfrom
jimczi:async_search_action_delete
Mar 12, 2020
Merged

Fix race condition when deleting an async search#53513
jimczi merged 3 commits intoelastic:masterfrom
jimczi:async_search_action_delete

Conversation

@jimczi
Copy link
Copy Markdown
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
Copy Markdown
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