aws-sdk-java icon indicating copy to clipboard operation
aws-sdk-java copied to clipboard

No way to attach listener right on TransferManger::uploadResume

Open Saoqq opened this issue 4 years ago • 4 comments

Describe the issue

There is no way to attach listener right during upload resume initiation. So it means possible loss of events until listener will be attached via upload::addProgressListener

Current Behavior

...
Upload result = transferMgr.resumeUpload(uploadToContinue);
result.addProgressListener(progressListener); // possible loss of events until listener will be attached

Excpected Behavior

...
Upload result = transferMgr.resumeUpload(uploadToContinue, listenerImpl);

Your Environment

  • AWS Java SDK version used: aws-java-sdk-s3:1.11.970
  • JDK version used: -
  • Operating System and version: -

Saoqq avatar Apr 16 '21 16:04 Saoqq

@Saoqq I see what you mean, you want the same config option of TransferManager Upload like transferMgr.upload(putObjectRequest, progressListener).

I guess it is possible to loose some events in theory, but I don't expect them to be significant. You can always obtain the upload's current TransferProgress by calling result.getProgress(). Are you experiencing any critical event losses?

debora-ito avatar Apr 29 '21 00:04 debora-ito

@debora-ito We are using PROGRESS_EVENTS to resume our threads and other activities, so this events are quite critical for us. We prevent this possible loss using reflection.

Overload for transferManager::resumeUpload with second param as progressListener looks quite natural to me

Saoqq avatar Apr 29 '21 15:04 Saoqq

Marking this as a feature request. Note that the team's focus is in Java SDK v2 work, so there's no timeline for when this will be prioritized.

debora-ito avatar May 04 '21 21:05 debora-ito

This is a very old issue that is probably not getting as much attention as it deserves. We encourage you to check if this is still an issue in the latest release and if you find that this is still a problem, please feel free to provide a comment or open a new issue.

github-actions[bot] avatar May 06 '24 03:05 github-actions[bot]