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
Cancel task and descendants on channel disconnects #56620
Conversation
Pinging @elastic/es-distributed (:Distributed/Task Management) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, much simpler than I expected :)
I think there's a minor leak here, and I left a few other small comments too.
...ava/org/elasticsearch/action/admin/cluster/node/tasks/cancel/TransportCancelTasksAction.java
Outdated
Show resolved
Hide resolved
Thanks @DaveCTurner for the helpful reviews. I've addressed your comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @dnhatn. A couple more questions...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left some comments but the change looks great !
Relying on channel closing seems more reliable than cluster state update so I expect that cancellation will be much more reactive with this change.
@DaveCTurner @jimczi Thanks for reviews. It's ready again. |
...ava/org/elasticsearch/action/admin/cluster/node/tasks/cancel/TransportCancelTasksAction.java
Outdated
Show resolved
Hide resolved
...ava/org/elasticsearch/action/admin/cluster/node/tasks/cancel/TransportCancelTasksAction.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for moving the code. I left one question, LGTM otherwise.
@DaveCTurner @jimczi Thank you for you reviews. |
Like elastic#56620, this change relies on channel disconnect instead of node leave events to remove parent-task ban markers. Relates elastic#65443 Relates elastic#56620
Like elastic#56620, this change relies on channel disconnect instead of node leave events to remove parent-task ban markers. Relates elastic#65443 Relates elastic#56620
If a channel gets disconnected, then we should cancel the tasks associated with that channel as their results won't be retrieved.
I opened this PR to provide more background for the discussion in #56327.
Closes #56327
Relates #56619