-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
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