Skip to content

Conversation

@DaveCTurner
Copy link
Contributor

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.

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 DaveCTurner added >non-issue :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs labels Nov 24, 2025
@elasticsearchmachine elasticsearchmachine added Team:Distributed Coordination Meta label for Distributed Coordination team v9.3.0 labels Nov 24, 2025
@elasticsearchmachine
Copy link
Collaborator

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

@DaveCTurner DaveCTurner added blocker Team:Distributed Coordination Meta label for Distributed Coordination team v9.3.0 and removed Team:Distributed Coordination Meta label for Distributed Coordination team v9.3.0 labels Nov 24, 2025
Copy link
Contributor

@joshua-adams-1 joshua-adams-1 left a comment

Choose a reason for hiding this comment

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

LGTM - how did you discover this change in behaviour? Since #138422 passed CI, I assume there wasn't a test failure. Is it worth adding one in a follow up PR?

@DaveCTurner
Copy link
Contributor Author

DaveCTurner commented Nov 24, 2025

It causes a failure of S3RepositoryAnalysisRestIT but unfortunately not every time. I hit this during some related development work.

@joshua-adams-1
Copy link
Contributor

What's the LOE in adding a unit test to mock the AwsServiceException being thrown?

@DaveCTurner DaveCTurner enabled auto-merge (squash) November 24, 2025 11:20
@DaveCTurner DaveCTurner merged commit 5dec80b into elastic:main Nov 24, 2025
34 checks passed
@DaveCTurner DaveCTurner deleted the 2025/11/24/s3-cas-exception-handling-2 branch November 24, 2025 14:08
szybia added a commit to szybia/elasticsearch that referenced this pull request Nov 24, 2025
…-json

* upstream/main: (247 commits)
  Mute org.elasticsearch.xpack.inference.integration.SemanticTextIndexOptionsIT testValidateIndexOptionsWithBasicLicense elastic#138513
  Mute org.elasticsearch.xpack.esql.heap_attack.HeapAttackLookupJoinIT testLookupExplosionBigString elastic#138510
  This shouldn't be zero (elastic#138501)
  sum of empty histogram is now null (elastic#138378)
  Test ES|QL bfloat16 support (elastic#138499)
  Fix exception handling in S3 `compareAndExchangeRegister` (elastic#138488)
  Mute org.elasticsearch.xpack.exponentialhistogram.ExponentialHistogramFieldMapperTests testFormattedDocValues elastic#138504
  Mute org.elasticsearch.ingest.geoip.IngestGeoIpClientYamlTestSuiteIT test {yaml=ingest_geoip/60_ip_location_databases/Test adding, getting, and removing ip location databases} elastic#138502
  ESQL: Refactor HeapAttackIT (elastic#138432)
  [Inference API] Add ElasticInferenceServiceDenseTextEmbeddingsServiceSettings to InferenceNamedWriteablesProvider (elastic#138484)
  Store split indices (elastic#138396)
  ES|QL Update CHUNK to support chunking_settings as optional argument (elastic#138123)
  Extract common blob-update logic in `S3HttpHandler` (elastic#138490)
  Cleanup esql request building api (elastic#138398)
  Round sum and avg in exponential_histogram CSV tests (elastic#138472)
  ESQL: load exponential_histogram total count as double instead of long (elastic#138417)
  [SIMD] Use fixed width native types for better Java interoperability (elastic#138429)
  Do not use Min or Max as Top's surrogate when there is an outputField (elastic#138380)
  ES|QL: Fix generative tests (elastic#138478)
  Mute org.elasticsearch.xpack.inference.integration.AuthorizationTaskExecutorIT testCreatesEisChatCompletion_DoesNotRemoveEndpointWhenNoLongerAuthorized elastic#138480
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocker :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs >non-issue Team:Distributed Coordination Meta label for Distributed Coordination team v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants