Open
Conversation
…r into its own class (following pattern from known content)
…r into its own class (following pattern from known content)
…a-v2 into alexwoo/max_in_flight_s3
alextwoods
commented
Mar 18, 2026
| "software.amazon.awssdk.services.s3.internal.crt.CrtResponseFileResponseTransformer"), | ||
| ArchUtils.classNameToPattern(RetryableSubAsyncRequestBody.class))); | ||
| ArchUtils.classNameToPattern(RetryableSubAsyncRequestBody.class), | ||
| ArchUtils.classNameToPattern(KnownContentLengthAsyncRequestBodySubscriber.class))); |
Contributor
Author
There was a problem hiding this comment.
This warn logging was pre-existing - see the change in UploadWithUnknownContentLengthHelper that moved the existing warning into KnownContentLengthAsyncRequestBodySubscriber
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Motivation and Context
When
MultipartS3AsyncClient.putObject()performs a multipart upload of a large object, all UploadPart requests are dispatched eagerly with no concurrency limit. For example, a 2 GB upload with 8 MiB parts produces ~256 UploadPart requests that immediately compete for the HTTP connection pool (default maxConcurrency=50), leading to connection acquisition timeouts:The existing
maxInFlightPartsconfiguration inParallelConfigurationalready limits concurrent GetObject requests for multipart downloads, but was not applied to the upload path.Fixes #6623
Modifications
maxInFlightPartsconfiguration to also apply to multipart upload (putObject) concurrency. The setting now limits concurrent part requests for bothgetObject(download) andputObject(upload) operations. Updated the Javadoc onParallelConfiguration.maxInFlightParts()to reflect this broader scope.KnownContentLengthAsyncRequestBodySubscriber.onNext(): instead of unconditionally callingsubscription.request(1)after dispatching each UploadPart, the subscriber now checksasyncRequestBodyInFlight < maxInFlightParts. When a part completes and in-flight count drops below the limit,subscription.request(1)resumes flow.UnknownContentLengthAsyncRequestBodySubscriber.sendUploadPartRequest().UnknownContentLengthAsyncRequestBodySubscriberfrom an inner class ofUploadWithUnknownContentLengthHelperinto its own top-level class, matching the existing pattern ofKnownContentLengthAsyncRequestBodySubscriber.Testing
New and existing unit tests.
Types of changes
Checklist
mvn installsucceedsscripts/new-changescript and following the instructions. Commit the new file created by the script in.changes/next-releasewith your changes.License