-
Notifications
You must be signed in to change notification settings - Fork 932
Stream retry support part 2: Introduce a new split method in AsyncRequestBody that returns an SdkP… #6346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature/master/mpu-stream-retry
Are you sure you want to change the base?
Conversation
93b3757
to
01a4cdb
Compare
01a4cdb
to
8f3a1ac
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new splitV2
method in AsyncRequestBody
that returns an SdkPublisher
of ClosableAsyncRequestBody
instead of AsyncRequestBody
, enabling proper resource management for split request bodies. This change is designed to support streaming retry for S3 multipart uploads.
- Adds
ClosableAsyncRequestBody
interface extendingAsyncRequestBody
with close capability - Updates S3 multipart client implementation to use the new
splitV2
method - Maintains backward compatibility by deprecating the original
split
method
Reviewed Changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
ClosableAsyncRequestBody.java |
New interface extending AsyncRequestBody with close capability |
AsyncRequestBody.java |
Adds splitV2 method and deprecates original split method |
SplittingPublisher.java |
Updates to return ClosableAsyncRequestBody and improve resource management |
UploadWithUnknownContentLengthHelper.java |
Updated to use splitV2 and properly close request bodies |
UploadWithKnownContentLengthHelper.java |
Updated to use splitV2 method |
KnownContentLengthAsyncRequestBodySubscriber.java |
Updated to handle ClosableAsyncRequestBody and close resources |
Test files | Updated tests to use new interfaces and verify retry behavior |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
core/sdk-core/src/main/java/software/amazon/awssdk/core/internal/async/SplittingPublisher.java
Outdated
Show resolved
Hide resolved
core/sdk-core/src/main/java/software/amazon/awssdk/core/internal/async/SplittingPublisher.java
Show resolved
Hide resolved
...tware/amazon/awssdk/services/s3/internal/multipart/UploadWithUnknownContentLengthHelper.java
Show resolved
Hide resolved
...azon/awssdk/services/s3/internal/multipart/KnownContentLengthAsyncRequestBodySubscriber.java
Show resolved
Hide resolved
8f3a1ac
to
e0a046e
Compare
…ublisher of ClosableAsyncRequestBody and use it in s3 multipart client
e0a046e
to
d94cec4
Compare
3814adb
to
3ffa942
Compare
3ffa942
to
3c91cc9
Compare
|
…ublisher of ClosableAsyncRequestBody and use it in s3 multipart client
Motivation and Context
This PR introduces a new splitV2 method in
AsyncRequestBody
that returns an SdkPublisher of ClosableAsyncRequestBody instead of AsyncRequestBody, enabling proper resource management for split request bodies. The change is primarily implemented to support streaming retry for S3 multipart client for retry Support retries for individual parts of a multipart upload in Java SDK V2 #6198Introduces ClosableAsyncRequestBody interface extending AsyncRequestBody with close capability
Updates S3 multipart client implementation to use the new splitV2 method
Maintains backward compatibility by deprecating the original split method
Testing
Added wiremock tests
Screenshots (if appropriate)
Types of changes
Checklist
mvn install
succeedsscripts/new-change
script and following the instructions. Commit the new file created by the script in.changes/next-release
with your changes.License