Skip to content

Conversation

@jimczi
Copy link
Contributor

@jimczi jimczi commented Jun 18, 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. So this commit doesn't change the behavior, it only cleans the internal to use the hierarchical cancellation introduced in #54757.

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.
@jimczi jimczi added >non-issue :Search/Search Search-related issues that do not fall into other categories v8.0.0 v7.9.0 labels Jun 18, 2020
@elasticmachine
Copy link
Collaborator

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

@elasticmachine elasticmachine added the Team:Search Meta label for search team label Jun 18, 2020
@jimczi jimczi requested a review from javanna June 18, 2020 14:44
Copy link
Member

@javanna javanna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering if it can still happen that we get here and submit is cancelled.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 jimczi merged commit 19ec636 into elastic:master Jun 24, 2020
@jimczi jimczi deleted the cancel_async_submit branch June 24, 2020 07:00
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.
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 Team:Search Meta label for search team v7.9.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants