gaborgsomogyi opened a new pull request, #28984:
URL: https://github.com/apache/flink/pull/28984
## What is the purpose of the change
The AWS SDK v2 `StandardRetryStrategy` used by `flink-s3-fs-native` enables
a token-bucket circuit breaker by default. Under a high volume of concurrent S3
requests hitting throttling (e.g. `getFileStatus`/`headObject` calls during a
large incremental checkpoint), this shared bucket can drain within seconds,
causing the SDK to abandon retries entirely and fail fast — regardless of the
configured `s3.retry.max-num-retries` and backoff settings. This differs from
the `flink-s3-fs-hadoop` (S3A) plugin's behavior, which keeps retrying/backing
off through throttling. This pull request adds a config option to disable the
circuit breaker so the configured retry/backoff settings fully govern retry
behavior, restoring S3A-like behavior by default.
## Brief change log
- Added `s3.retry.circuit-breaker.enabled` config option to
`NativeS3FileSystemFactory`, defaulting to `false`
- Wired the option through `S3ClientProvider.Builder` into
`StandardRetryStrategy.Builder#circuitBreakerEnabled(...)`
- Added a `@VisibleForTesting` getter on `S3ClientProvider` for the new
setting
## Verifying this change
This change added tests and can be verified as follows:
- Added `testRetryCircuitBreakerEnabledOverride` and extended
`testRetryBuilderDefaultsMatchConfigOptions` in `S3ClientProviderTest` to
verify the builder default and explicit override
- Added `testRetryCircuitBreakerEnabledDefault` and
`testRetryCircuitBreakerEnabledExplicitlyConfigured` in
`NativeS3FileSystemFactoryTest` to verify the config option is correctly read
and wired through the filesystem factory
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): no
- The public API, i.e., is any changed class annotated with
`@Public(Evolving)`: no
- The serializers: no
- The runtime per-record code paths (performance sensitive): no
- Anything that affects deployment or recovery: JobManager (and its
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: yes, improves
checkpoint reliability against S3 throttling for `flink-s3-fs-native`
- The S3 file system connector: yes
## Documentation
- Does this pull request introduce a new feature? yes
- If yes, how is the feature documented? JavaDocs / config option
description (`s3.retry.circuit-breaker.enabled`)
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes (please specify the tool below)
Claude code
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]