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

Fix reading empty files from S3 and GCS #22473

Merged
merged 2 commits into from
Jun 21, 2024

Conversation

nineinchnick
Copy link
Member

Description

When reading an empty file from S3 as a stream, using the AWS SDK v2, it
incorrectly keeps reading the MD5 checksum included at the end of the
response. This has been reported upstream as
aws/aws-sdk-java-v2#3538

For GCS, skip the boundary check for empty files.

Important

This is a follow-up to #22469 that was not tested with all secrets. Run a workflow with all secrets before merging.

Additional context and related issues

Release notes

(x) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text:

When reading an empty file from S3 as a stream, using the AWS SDK v2, it
incorrectly keeps reading the MD5 checksum included at the end of the
response. This has been reported upstream as
aws/aws-sdk-java-v2#3538
@nineinchnick
Copy link
Member Author

@findepi can you run the workflow with secrets?

@wendigo
Copy link
Contributor

wendigo commented Jun 21, 2024

I love the important part 🫡

@wendigo
Copy link
Contributor

wendigo commented Jun 21, 2024

Testing here: #22474

@wendigo wendigo merged commit fe4c9c4 into trinodb:master Jun 21, 2024
124 of 127 checks passed
@github-actions github-actions bot added this to the 451 milestone Jun 21, 2024
@@ -196,6 +196,10 @@ private void seekStream()
rangeRequest = request.toBuilder().range(range).build();
}
in = client.getObject(rangeRequest);
// a workaround for https://github.com/aws/aws-sdk-java-v2/issues/3538
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a follow-up of #22469 ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, see the PR description

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants