-
Notifications
You must be signed in to change notification settings - Fork 853
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
Fixing Java S3 Client Transfer Manager issue with transferComplete() not called for AsyncRequestBody.fromFile #4440
Conversation
…not called for AsyncRequestBody.fromFile
...r/src/test/java/software/amazon/awssdk/transfer/s3/internal/TransferProgressUpdaterTest.java
Outdated
Show resolved
Hide resolved
...r/src/test/java/software/amazon/awssdk/transfer/s3/internal/TransferProgressUpdaterTest.java
Outdated
Show resolved
Hide resolved
...r/src/test/java/software/amazon/awssdk/transfer/s3/internal/TransferProgressUpdaterTest.java
Outdated
Show resolved
Hide resolved
...r/src/test/java/software/amazon/awssdk/transfer/s3/internal/TransferProgressUpdaterTest.java
Outdated
Show resolved
Hide resolved
...r/src/test/java/software/amazon/awssdk/transfer/s3/internal/TransferProgressUpdaterTest.java
Outdated
Show resolved
Hide resolved
...r/src/test/java/software/amazon/awssdk/transfer/s3/internal/TransferProgressUpdaterTest.java
Outdated
Show resolved
Hide resolved
...r/src/it/java/software/amazon/awssdk/transfer/s3/S3TransferManagerUploadIntegrationTest.java
Outdated
Show resolved
Hide resolved
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.
Can we add a comment to the NettyRequestExecutor.java shouldContinuePublishing()
to indicate that the check can cause issues and what the mitigation is?
I doubt a comment would help much. We should conduct a Failure Mode Analysis to see what happens if we make the suggested fixe by invoking shouldContinuePublishing before done and modifying |
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.
A deep dive would be ideal, but likely not happening at this point in time. My concern is that after some time the discussion in the PR will be forgotten and we'll lose context and time figuring out the same thing again, for a different issue and that a comment would let us connect the two parts of the code.
Personally I don't care how people would interpret a comment (if they even saw it). As developers we make trade-off decisions every day, and it's not a bad thing to be prudent. That being said, will leave it up to you.
Kudos, SonarCloud Quality Gate passed! |
Fixing Java S3 Client Transfer Manager issue with transferComplete() not called for AsyncRequestBody.fromFile
Motivation and Context
S3TransferManager
: TheTransferListener.transferComplete()
is not invoked whenAsyncRequestBody.fromFile()
is used #3839Root Cause
shouldContinuePublishing
after DoneCheck-OnNext checks<
instead of<=
inshouldContinuePublishing()
.Modifications
shouldContinuePublishing
before theisDone
check and then update<
to<=
inshouldContinuePublishing()
.transferComplete
once all the bytes are received.done
flag to ensure thattransferComplete
is not called more than once.Testing
Types of changes
License