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

Identify cancelled tasks in list tasks API #72931

Merged

Conversation

DaveCTurner
Copy link
Contributor

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

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 DaveCTurner added >enhancement :Distributed/Task Management Issues for anything around the Tasks API - both persistent and node level. v8.0.0 v7.14.0 labels May 11, 2021
@DaveCTurner DaveCTurner requested review from tlrx and fcofdez May 11, 2021 14:11
@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)

Copy link
Contributor

@fcofdez fcofdez left a comment

Choose a reason for hiding this comment

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

LGTM, thanks David!

@@ -243,6 +244,13 @@ nodes `nodeId1` and `nodeId2`.
POST _tasks/_cancel?nodes=nodeId1,nodeId2&actions=*reindex
--------------------------------------------------

A task may continue to run for some time after it has been cancelled because it
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Copy link
Member

@tlrx tlrx left a comment

Choose a reason for hiding this comment

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

LGTM, this is the kind of small changes that makes everyone's life easier 👍

@DaveCTurner DaveCTurner merged commit b2956b3 into elastic:master May 17, 2021
@DaveCTurner DaveCTurner deleted the 2021-05-11-list-tasks-cancelled-flag branch May 17, 2021 10:02
DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this pull request May 17, 2021
DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this pull request May 17, 2021
Adjusts wire-compat and re-enables BWC tests
@DaveCTurner
Copy link
Contributor Author

Thanks both!

DaveCTurner added a commit that referenced this pull request 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 pull request May 17, 2021
An earlier commit 6d8b841 contains a
silly mistake in a test. This fixes that.

Relates #72931
DaveCTurner added a commit that referenced this pull request May 17, 2021
Adjusts wire-compat and re-enables BWC tests
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 v7.14.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show that cancellable task has been cancelled in tasks API
5 participants