[BUG] _msearch API doesn't properly handle task cancellation #17004
Labels
bug
Something isn't working
Search:Resiliency
v2.19.0
Issues and PRs related to version 2.19.0
v3.0.0
Issues and PRs related to version 3.0.0
Describe the bug
The _msearch API will execute some number of requests concurrently (up to
max_concurrent_searches
), but will queue up any requests beyond that and execute them in a callback once initial requests complete.If the task times out (or is otherwise canceled), we still try to execute the subsequent requests anyway. This throws an uncaught exception with the following stack trace:
This results in a "zombie"
indices:data/read/msearch
task.Related component
Search:Resiliency
To Reproduce
N/A
Expected behavior
If the parent msearch task is canceled, we should not try to run any more search requests.
Additional Details
N/A
The text was updated successfully, but these errors were encountered: