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

PUT requests do not support setReadLimit option

Open kdelalic opened this issue 4 years ago • 6 comments

Describe the bug

When uploading a large file via a streaming multipart upload, "Read time out" errors are thrown and an individual part is not able to be retried because the buffer size is only 128k. In v1, we are able to get around this issue by increasing the read limit to the size of the block/part that is being uploaded. This feature seems to be missing from the v2 SDK.

v1 docs for increasing read limit: https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/best-practices.html

Expected Behavior

setReadLimit option should be exposed in v2 SDK.

Current Behavior

It is not exposed and we get "read time out" errors.

Reproduction Steps

Upload large file using multipart upload via inputStream.

Possible Solution

No response

Additional Information/Context

No response

AWS Java SDK version used

2.17.295

JDK version used

N/A

Operating System and version

N/A

kdelalic avatar Nov 22 '22 18:11 kdelalic

Hi @yasminetalby, are there any updates for this issue? This is blocking our upgrade to SDK v2

kdelalic avatar Nov 30 '22 18:11 kdelalic

Hello @kdelalic ,

Thank you very much for bringing this up to our attention. I sincerely apologies for the long delay of answer on this issue. setReadLimit is indeed not available in the AWS Java SDK V2. I have brought this up to discussion with the team. We believe that this would be a good feature to add.

I have added this to the backlog and will keep you updated through this issue.

Thank you very much once again for bringing this up to our attention.

Sincerely,

Yasmine.

yasminetalby avatar Dec 22 '22 18:12 yasminetalby

Hello @kdelalic ,

I hope that you are doing well. I was wondering if you could provide a sample code of your use case and SDK usage in v1 and v2?

Best,

Yasmine

yasminetalby avatar Jan 05 '23 20:01 yasminetalby

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[bot] avatar Jan 10 '23 21:01 github-actions[bot]

Hi all, I have been trying to implement Best Practices for AWS Development with the AWS SDK for Java with SDK v2. However, I can't do that without setReadLimit in SDK v2. Any thoughts? TIA

KamalMicheal avatar Apr 10 '23 05:04 KamalMicheal

Is this issue solved? Here a code example from V1 that can't be done in V2 request.getRequestClientOptions().setReadLimit((int) (object.getObjectMetadata().getContentLength() + 1)); There's no equivalent in AWS V2 SDK

facuqubika avatar May 09 '24 20:05 facuqubika