Skip to content

[8.x] Fix race condition in RestCancellableNodeClient (#126686)#126697

Merged
elasticsearchmachine merged 1 commit intoelastic:8.xfrom
DaveCTurner:backport/8.x/pr-126686
Apr 11, 2025
Merged

[8.x] Fix race condition in RestCancellableNodeClient (#126686)#126697
elasticsearchmachine merged 1 commit intoelastic:8.xfrom
DaveCTurner:backport/8.x/pr-126686

Conversation

@DaveCTurner
Copy link
Contributor

Backports the following commits to 8.x:

Today we rely on registering the channel after registering the task to
be cancelled to ensure that the task is cancelled even if the channel is
closed concurrently. However the client may already have processed a
cancellable request on the channel and therefore this mechanism doesn't
work. With this change we make sure not to register another task after
draining the registrations in order to cancel them.

Closes elastic#88201
@DaveCTurner DaveCTurner added :Distributed/Task Management Issues for anything around the Tasks API - both persistent and node level. >bug auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport Team:Distributed Coordination (obsolete) Meta label for Distributed Coordination team. Obsolete. Please do not use. labels Apr 11, 2025
@elasticsearchmachine elasticsearchmachine merged commit 58c5a3f into elastic:8.x Apr 11, 2025
15 checks passed
@DaveCTurner DaveCTurner deleted the backport/8.x/pr-126686 branch April 11, 2025 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport >bug :Distributed/Task Management Issues for anything around the Tasks API - both persistent and node level. Team:Distributed Coordination (obsolete) Meta label for Distributed Coordination team. Obsolete. Please do not use. v8.19.0

2 participants