Why _msearch request isn't cancellable(=false)?

In ES-7.4.2, search request is cancellable(=true) but _msearch request isn't. What's the idea behind it ??

It's in progress for a future version (see https://github.com/elastic/elasticsearch/pull/44494) but needed some changes to how task cancellation was implemented internally first.

Thanks for quick response. I have seen these changes. I wanted to know by making these changes , Are we able to cancel msearch request ??
Because, I am facing some problem in it. When I am cancelling the task by using taskid, It's show 'resource not found' exception. and Most of the time, It isn't showing under running tasks (not able to get taskid) while msearch request is still pending.
But in search request, I am not facing such issue .

Yes, multi search tasks will be cancellable when the "make multi search tasks cancellable" issue is completed.

Yes, multi-search requests are not yet cancellable so it is to be expected that cancelling them doesn't work.

FWIW the preferred way to cancel a search request is simply to close the client connection, not to use the task management API.

I am a little bit confused here.

As in the image, We have 'action = search' and 'cancellable = true' . Does this not mean, We can cancel the search request by using taskid ??
https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html

Sorry I don't understand the question. Cancellable tasks can be cancelled, but msearch requests aren't cancellable?

okay, let me explain whole scenario.
I am using Multi Search API(_msearch) for query that is taking long time to execute. I want to cancel that query. I have made multi search tasks cancellable(=true).
Can we cancel that query through task management api??

You can not cancel it at the moment. Based on the release tags on the pull request David linked to it will be possible when version 7.9 comes out, so you would need to upgrade at that point.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.