Submit _async search task should cancel children on cancellation#58332
Merged
jimczi merged 1 commit intoelastic:masterfrom Jun 24, 2020
Merged
Submit _async search task should cancel children on cancellation#58332jimczi merged 1 commit intoelastic:masterfrom
jimczi merged 1 commit intoelastic:masterfrom
Conversation
This change allows the submit async search task to cancel children and removes the manual indirection that cancels the search task when the submit task is cancelled. This is now handled by the task cancellation, which can cancel grand-children since elastic#54757.
Collaborator
|
Pinging @elastic/es-search (:Search/Search) |
javanna
approved these changes
Jun 18, 2020
Contributor
javanna
left a comment
There was a problem hiding this comment.
left a question, LGTM otherwise. Thanks, I had this in my TODO list but I'm not sure when I would have gotten to it ;)
| // the task is still running and the user cannot wait more so we create | ||
| // a document for further retrieval | ||
| try { | ||
| if (submitTask.isCancelled()) { |
Contributor
There was a problem hiding this comment.
I was wondering if it can still happen that we get here and submit is cancelled.
Contributor
Author
There was a problem hiding this comment.
I think that's ok, the cancelled may be delayed but we'll remove the document at the end (onFinalResponse checks if the task was cancelled).
jimczi
added a commit
that referenced
this pull request
Jun 24, 2020
) This change allows the submit async search task to cancel children and removes the manual indirection that cancels the search task when the submit task is cancelled. This is now handled by the task cancellation, which can cancel grand-children since #54757.
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 allows the submit async search task to cancel children
and removes the manual indirection that cancels the search task when the submit
task is cancelled. This is now handled by the task cancellation, which can cancel
grand-children since #54757. So this commit doesn't change the behavior, it only cleans the internal to use the hierarchical cancellation introduced in #54757.