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

Fully stop RetryableAction when cancelled #55614

Merged
merged 3 commits into from
Apr 24, 2020

Conversation

Tim-Brooks
Copy link
Contributor

Currently cancelling the RetryableAction does not stop one last run from
being executed. This commit makes a best effort attempt to cancel a
scheduled retry and guards future executions from the action already
being completed.

Currently cancelling the RetryableAction does not stop one last run from
being executed. This commit makes a best effort attempt to cancel a
scheduled retry and guards future executions from the action already
being completed.
@Tim-Brooks Tim-Brooks added >non-issue :Core/Infra/Resiliency Keep running when everything is ok. Die quickly if things go horribly wrong. v8.0.0 v7.8.0 labels Apr 22, 2020
@Tim-Brooks Tim-Brooks requested review from ywelsch and dnhatn April 22, 2020 18:22
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (:Core/Infra/Resiliency)

@Tim-Brooks
Copy link
Contributor Author

Tim-Brooks commented Apr 22, 2020

Maybe more of this work should be implemented in the ThreadPool? Cancelling the task only cancels the execution on the ScheduledThreadPoolExecutor. If that task has successfully executed and scheduled the thing on the final executor (say GENERIC), the task will still run on GENERIC even if it is still in the GENERIC queue at cancellation time.

@Tim-Brooks Tim-Brooks requested a review from ywelsch April 23, 2020 16:03
Copy link
Member

@dnhatn dnhatn left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@ywelsch ywelsch left a comment

Choose a reason for hiding this comment

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

LGTM

@Tim-Brooks Tim-Brooks merged commit f2cf9e9 into elastic:master Apr 24, 2020
Tim-Brooks added a commit that referenced this pull request Apr 28, 2020
Currently cancelling the RetryableAction does not stop one last run from
being executed. This commit makes a best effort attempt to cancel a
scheduled retry and guards future executions from the action already
being completed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Resiliency Keep running when everything is ok. Die quickly if things go horribly wrong. >non-issue v7.8.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants