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

Make multi search tasks cancellable #44494

Closed

Conversation

javanna
Copy link
Member

@javanna javanna commented Jul 17, 2019

Today multi search tasks, created through MultiSearchRequest#createTask
end up being the default task instance which is not cancellable. With
this change we make them a search task, which is cancellable, and also
cancels all the sub-tasks when cancelled.

Today multi search tasks, created through MultiSearchRequest#createTask
end up being the default task instance which is not cancellable. With
this change we make them a search task, which is cancellable, and also
cancels all the sub-tasks when cancelled.
@javanna javanna added >enhancement :Search/Search Search-related issues that do not fall into other categories v8.0.0 v7.4.0 labels Jul 17, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

Copy link
Contributor

@imotov imotov left a comment

Choose a reason for hiding this comment

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

I think it should work, but I would feel better if we had an integration level test that really checks that we connected all dots here. You can probably modify SearchCancellationIT to randomly wrap it into MultiSearch from time to time.

@javanna
Copy link
Member Author

javanna commented Jul 22, 2019

Turns out that an integration test is needed, and it proves that cancelling msearch requests does not really cancel all the corresponding searches as there are three levels of tasks: msearch -> search -> shard level search . I will work on making cancelling a task work for this scenario, but it will require a separate change.

@javanna
Copy link
Member Author

javanna commented Feb 19, 2020

This PR can be resumed once #50990 is fixed.

@bpintea bpintea added v7.8.0 and removed v7.7.0 labels Mar 25, 2020
@javanna javanna removed the stalled label Apr 6, 2020
@javanna
Copy link
Member Author

javanna commented Apr 6, 2020

I removed the stalled label, I will pick this back up shortly given that the tasks framework now supports hierarchical cancellation of tasks.

@rjernst rjernst added the Team:Search Meta label for search team label May 4, 2020
@javanna
Copy link
Member Author

javanna commented Aug 20, 2020

This was implemented in #61337

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team v7.10.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants