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

PUT requests do not support setReadLimit option #5210

Open
facuqubika opened this issue May 9, 2024 · 2 comments
Open

PUT requests do not support setReadLimit option #5210

facuqubika opened this issue May 9, 2024 · 2 comments
Assignees
Labels
bug This issue is a bug. p2 This is a standard priority issue response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 10 days.

Comments

@facuqubika
Copy link

Describe the bug

Reopening #3559
I still don't see any solution to how we can set a read limit when uploading an object with transfer manager using UploadRequest

Expected Behavior

Expose set read limit or an equivalent to set this variable

Current Behavior

"read time out" errors.

Reproduction Steps

Code:

UploadRequest request = UploadRequest.builder().putObjectRequest(
            PutObjectRequest.builder().bucket(bucket).key(key).cacheControl(S3_CACHE_CONTROL_HEADER)
                    .contentMD5(getMd5ObjectContent(key)).metadata(getObjectMetadata(key)).build())
            .build();

//    request.getRequestClientOptions().setReadLimit((int) (object.getObjectMetadata().getContentLength() + 1));
//    Looks like we can't set the read limit https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/best-practices.html
    Upload upload = transferManager.upload(request);

Possible Solution

Expose setReadLimit to UploadRequest

Additional Information/Context

No response

AWS Java SDK version used

2.25.47

JDK version used

8

Operating System and version

Mac

@facuqubika facuqubika added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels May 9, 2024
@facuqubika
Copy link
Author

This is something even recommend it at the end of this documentation

@bhoradc bhoradc added p2 This is a standard priority issue and removed needs-triage This issue or PR still needs to be triaged. labels May 15, 2024
@bhoradc bhoradc self-assigned this May 15, 2024
@bhoradc
Copy link

bhoradc commented Jun 5, 2024

Hi @facuqubika,

Thank you for reporting the issue. Can you please check if this PR #4643 addresses your requirement?
Per this change, it allows users to configure max read limit in V2 on Async clients. And with the Sync clients, this could be achieved via RequestBody, (RequestBody#fromContentProvider).

Regards,
Chaitanya

@bhoradc bhoradc added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 10 days. label Jun 5, 2024
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. p2 This is a standard priority issue response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 10 days.
Projects
None yet
Development

No branches or pull requests

2 participants