Skip to content
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

Transfer.waitForCompletion() completes even TransferState is Waiting #3169

Closed
1 of 2 tasks
iLoveOctoCat opened this issue Dec 18, 2024 · 2 comments
Closed
1 of 2 tasks
Labels
bug This issue is a bug. closed-for-staleness p2 This is a standard priority issue response-requested Waiting on additional info or feedback. Will move to "closing-soon" in 5 days.

Comments

@iLoveOctoCat
Copy link

Upcoming End-of-Support

  • I acknowledge the upcoming end-of-support for AWS SDK for Java v1 was announced, and migration to AWS SDK for Java v2 is recommended.

Describe the bug

In our spring boot application, we are using transferManager and uploadFileList method to upload a file. Also, we are waiting for upload to get completed with blocking operation waitForCompletion() but intermittently for few requests waitForCompletion method returning the control to the actual main thread even though Transfer state is Waiting where as per the documentation we were expecting waitForCompletion() to return the control the actual thread only after the transfer is complete i.e Transfer state is one of the Completed, Canceled or Failed.

// @Autowired private TransferManager transferManagerClient;
multipleFileUpload = transferManagerClient.uploadFileList(bucketName, filePath, directory, fileList);
multipleFileUpload.waitForCompletion();

log.info("File uploaded to S3: {}", multipleFileUpload.getState()); // this logs state as Waiting 

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

waitForCompletion() to return the control the actual thread only after the transfer is complete i.e Transfer state is one of the Completed, Canceled or Failed

Current Behavior

Intermittently, waitForCompletion() to returns the control the actual thread even if transfer state is Waiting.

Reproduction Steps

This issue is intermittent and seems like concurrency issue. Hence, hard to reproduce.

Possible Solution

No response

Additional Information/Context

No response

AWS Java SDK version used

1.12.261

JDK version used

17

Operating System and version

TBA

@iLoveOctoCat iLoveOctoCat added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Dec 18, 2024
@debora-ito
Copy link
Member

Hi @iLoveOctoCat, to investigate this further we would need a sample code that reproduces the issue reliably.

As you read in the announcements, Java SDK v1 is in Maintenance Mode and will only get critical bug fixes and security updates. I suggest to test Java SDK v2 S3TransferManager and see if you run into the same issue.

If you can reproduce it reliably, send us a self-contained repro code and we'll take a look.

@debora-ito debora-ito added p2 This is a standard priority issue response-requested Waiting on additional info or feedback. Will move to "closing-soon" in 5 days. and removed needs-triage This issue or PR still needs to be triaged. labels Dec 25, 2024
Copy link

github-actions bot commented Jan 4, 2025

It looks like this issue has not been active for more than five days. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please add a comment to prevent automatic closure, or if the issue is already closed please feel free to reopen it.

@github-actions github-actions bot added closing-soon This issue will close in 2 days unless further comments are made. closed-for-staleness and removed closing-soon This issue will close in 2 days unless further comments are made. labels Jan 4, 2025
@github-actions github-actions bot closed this as completed Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. closed-for-staleness p2 This is a standard priority issue response-requested Waiting on additional info or feedback. Will move to "closing-soon" in 5 days.
Projects
None yet
Development

No branches or pull requests

2 participants