Skip to content

Rename S3 CompareAndExchangeOperation#138422

Merged
DaveCTurner merged 2 commits intoelastic:mainfrom
DaveCTurner:2025/11/21/s3-mpu-cas
Nov 21, 2025
Merged

Rename S3 CompareAndExchangeOperation#138422
DaveCTurner merged 2 commits intoelastic:mainfrom
DaveCTurner:2025/11/21/s3-mpu-cas

Conversation

@DaveCTurner
Copy link
Copy Markdown
Member

As a preparatory step to providing an alternative implementation of the
compare-and-exchange operation on S3, this commit renames the existing
implementation and shifts the necessary exception-handling logic inside
its run method for improved encapsulation.

As a preparatory step to providing an alternative implementation of the
compare-and-exchange operation on S3, this commit renames the existing
implementation and shifts the necessary exception-handling logic inside
its `run` method for improved encapsulation.
@DaveCTurner DaveCTurner requested a review from mhl-b November 21, 2025 13:46
@DaveCTurner DaveCTurner added >non-issue :Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs labels Nov 21, 2025
@elasticsearchmachine elasticsearchmachine added v9.3.0 Team:Distributed Coordination (obsolete) Meta label for Distributed Coordination team. Obsolete. Please do not use. labels Nov 21, 2025
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

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

l
)
ActionListener.run(
ActionListener.releaseBefore(clientReference, listener),
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The only difference in behaviour is that this used to be releaseAfter, but I think that was only because we didn't have releaseBefore when the code was originally written.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Actually this is lies, there's another more important change in behaviour which #138488 addresses. 🤦

Copy link
Copy Markdown
Contributor

@mhl-b mhl-b left a comment

Choose a reason for hiding this comment

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

LGTM

@DaveCTurner DaveCTurner merged commit b5cc1c4 into elastic:main Nov 21, 2025
34 checks passed
DaveCTurner added a commit to DaveCTurner/elasticsearch that referenced this pull request Nov 24, 2025
In elastic#138422 we shifted the exception handling for
`compareAndExchangeRegister` into its `run()` method, but this
introduced a subtle bug: an `AwsServiceException` may be thrown
synchronously, bypassing the handling added to the listener with the
`delegateResponse` call. This commit reinstates the missing exception
handling.
DaveCTurner added a commit that referenced this pull request Nov 24, 2025
In #138422 we shifted the exception handling for
`compareAndExchangeRegister` into its `run()` method, but this
introduced a subtle bug: an `AwsServiceException` may be thrown
synchronously, bypassing the handling added to the listener with the
`delegateResponse` call. This commit reinstates the missing exception
handling.
afoucret pushed a commit to afoucret/elasticsearch that referenced this pull request Nov 26, 2025
…8488)

In elastic#138422 we shifted the exception handling for
`compareAndExchangeRegister` into its `run()` method, but this
introduced a subtle bug: an `AwsServiceException` may be thrown
synchronously, bypassing the handling added to the listener with the
`delegateResponse` call. This commit reinstates the missing exception
handling.
ncordon pushed a commit to ncordon/elasticsearch that referenced this pull request Nov 26, 2025
As a preparatory step to providing an alternative implementation of the
compare-and-exchange operation on S3, this commit renames the existing
implementation and shifts the necessary exception-handling logic inside
its `run` method for improved encapsulation.
ncordon pushed a commit to ncordon/elasticsearch that referenced this pull request Nov 26, 2025
…8488)

In elastic#138422 we shifted the exception handling for
`compareAndExchangeRegister` into its `run()` method, but this
introduced a subtle bug: an `AwsServiceException` may be thrown
synchronously, bypassing the handling added to the listener with the
`delegateResponse` call. This commit reinstates the missing exception
handling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs >non-issue Team:Distributed Coordination (obsolete) Meta label for Distributed Coordination team. Obsolete. Please do not use. v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants