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

Show that cancellable task has been cancelled in tasks API #72907

Closed
DaveCTurner opened this issue May 11, 2021 · 1 comment · Fixed by #72931
Closed

Show that cancellable task has been cancelled in tasks API #72907

DaveCTurner opened this issue May 11, 2021 · 1 comment · Fixed by #72931
Labels
:Distributed/Task Management Issues for anything around the Tasks API - both persistent and node level. >enhancement Team:Distributed Meta label for distributed team

Comments

@DaveCTurner
Copy link
Contributor

Task cancellation works by having the task poll the cancellation flag whenever it is convenient to do so. In some cases the convenient times might be separated by a very long interval, so even if the task is cancelled it still runs for a while and appears in the output of the tasks API. Today we don't expose the cancellation flag in the tasks API so users cannot tell whether any given task has already been cancelled, which can be frustrating.

The tasks API should include a "cancelled": true flag on tasks that have been cancelled.

Splitting this idea out from the more general #67505 to clarify the action needed.

@DaveCTurner DaveCTurner added >enhancement help wanted adoptme :Distributed/Task Management Issues for anything around the Tasks API - both persistent and node level. labels May 11, 2021
@elasticmachine elasticmachine added the Team:Distributed Meta label for distributed team label May 11, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

@DaveCTurner DaveCTurner removed the help wanted adoptme label May 11, 2021
DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this issue May 11, 2021
This commit adds a `cancelled` flag to each cancellable task in the
response to the list tasks API, allowing users to see that a task has
been properly cancelled and will complete as soon as possible.

Closes elastic#72907
DaveCTurner added a commit that referenced this issue May 17, 2021
This commit adds a `cancelled` flag to each cancellable task in the
response to the list tasks API, allowing users to see that a task has
been properly cancelled and will complete as soon as possible.

Closes #72907
DaveCTurner added a commit that referenced this issue May 17, 2021
This commit adds a `cancelled` flag to each cancellable task in the
response to the list tasks API, allowing users to see that a task has
been properly cancelled and will complete as soon as possible.

Closes #72907
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed/Task Management Issues for anything around the Tasks API - both persistent and node level. >enhancement Team:Distributed Meta label for distributed team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants