PUT requests do not support setReadLimit option
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
Hi @yasminetalby, are there any updates for this issue? This is blocking our upgrade to SDK v2
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.
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
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.
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
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