-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
GH-45304: [C++][S3] Workaround compatibility issue between AWS SDK and MinIO #45310
Conversation
I need to report this issue upstream. |
|
@github-actions crossbow submit -g cpp -g python |
This comment was marked as outdated.
This comment was marked as outdated.
89635cb
to
62b1f21
Compare
@github-actions crossbow submit -g cpp -g python |
Revision: 62b1f21 Submitted crossbow builds: ursacomputing/crossbow @ actions-03d11b8bfe |
62b1f21
to
20d3577
Compare
@github-actions crossbow submit -g cpp -g python |
Revision: 20d3577 Submitted crossbow builds: ursacomputing/crossbow @ actions-7c6cbeaabc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
cpp/src/arrow/filesystem/s3fs.cc
Outdated
req.SetContentLength(nbytes); | ||
RETURN_NOT_OK(SetSSECustomerKey(&req, sse_customer_key_)); | ||
|
||
if (!background_writes_) { | ||
req.SetBody(std::make_shared<StringViewStream>(data, nbytes)); | ||
// (GH-45304: avoid setting a body stream if length is 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a comment that we can remove this workaround when we require aws-sdk-cpp 1.11.489 or later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, done. Thanks for the suggestion.
20d3577
to
b150429
Compare
Rationale for this change
Some AWS SDK versions have faulty chunked encoding when the body is 0 bytes:
aws/aws-sdk-cpp#3259
What changes are included in this PR?
Work around faulty chunked encoding implementation by only setting a body stream if non-empty.
Are these changes tested?
Locally for now, but will be picked by CI (and conda-forge) at some point.
Are there any user-facing changes?
No.