Samrat002 opened a new pull request, #27970:
URL: https://github.com/apache/flink/pull/27970
## What is the purpose of the change
This pull request prevents S3 connection pool exhaustion during RocksDB
state restore when using the Native S3 filesystem. When NativeS3BulkCopyHelper
fires concurrent downloads
via S3TransferManager, each multipart download can consume multiple HTTP
connections. With the default pool size of 50 and a batch concurrency of 16,
the pool can be exhausted,
causing downloads to hang until the SDK's 10-second acquire timeout
expires — resulting in opaque SdkClientException failures during checkpoint
restore.
The fix introduces a configurable s3.connection.max option, clamps
s3.bulk-copy.max-concurrent to the connection pool size, raises the connection
acquisition timeout from the SDK
default of 10s to the user-configured connection timeout
## Brief change log
*(for example:)*
- *The TaskInfo is stored in the blob store on job creation time as a
persistent artifact*
- *Deployments RPC transmits only the blob storage reference*
- *TaskManagers retrieve the TaskInfo from the blob cache*
## Verifying this change
- Added testConnectionPoolExhaustedDetection in NativeS3BulkCopyHelperTest
to verify detection of the SDK's connection acquire timeout message in both
direct and nested causal
chains, as well as false-positive resistance
- Added testEmptyRequestListIsNoOp in NativeS3BulkCopyHelperTest to verify
no NPE when no files are requested
- Added testInvalidMaxConnectionsThrowsException and
testInvalidBulkCopyMaxConcurrentThrowsException in
NativeS3FileSystemFactoryTest to verify config validation through the
factory
- Added testBulkCopyMaxConcurrentClampedToMaxConnections and
testBulkCopyMaxConcurrentPreservedWithinMaxConnections in
NativeS3FileSystemFactoryTest to verify the clamping logic
end-to-end through factory → filesystem → bulk copy helper
## 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: yes (affects state restore
from S3 checkpoints)
- The S3 file system connector: yes
## Documentation
- Does this pull request introduce a new feature? yes
- If yes, how is the feature documented? JavaDocs
--
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]