Skip to content

Cancel search request when its underlying connection gets closed #43105

Closed
@javanna

Description

@javanna

Every search request is associated with an internal task that can be found through the list tasks API. Such task can be cancelled and throughout the execution of a search request we make the best effort of stopping it whenever the corresponding parent task has been cancelled by calling the cancel task API.

From a user perspective, cancelling a query could be made easier. One has to call list tasks, find out which task is associated with which query, which involves listing the tasks from each node in the cluster. Once the task has been found, the cancel task API can be called providing the task id as argument.

A way to simplify cancelling queries would be to detect whenever the underlying connection gets closed, which is what happens when a request times out on the client side, and pro-actively cancel the corresponding task. There would be no additional calls required, and queries would get cancelled automatically which would improve things on the server-side too as we would no longer rely on users to remember that they have to cancel their queries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions