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

S3RangeReader totalLength Improvment #3025

Merged
merged 4 commits into from Jul 19, 2019

Conversation

jbouffard
Copy link

@jbouffard jbouffard commented Jul 16, 2019

Overview

This PR changes how the totalLength value of S3RangeReader is computed. It will now use a GetObjectResponse instead of a GetHeaderResponse. This will allow users to read these files even if they don't have permission to access its HEADER.

Checklist

  • docs/CHANGELOG.rst updated, if necessary
  • Check it on a real S3 bucket with permission limits

Closes #2889

Jacob Bouffard added 2 commits July 16, 2019 14:35
Signed-off-by: Jacob Bouffard <jbouffard@azavea.com>
Signed-off-by: Jacob Bouffard <jbouffard@azavea.com>
@jbouffard
Copy link
Author

I'm not really sure there are any unit tests that can be created for this PR. It might be good to test this branch on a real world example.

Signed-off-by: Jacob Bouffard <jbouffard@azavea.com>
Signed-off-by: Jacob Bouffard <jbouffard@azavea.com>
@jbouffard
Copy link
Author

@echeipesh @pomadchin After mentioning my results yesterday, @moradology looked into it as well and found that using a responseStream worked fine for finding the contentLength. I ran the code again this morning and observed similar speeds as Nathan. I'm not sure what happened yesterday 😕 As everything was so much slower. Regardless, this PR should be good to merge now.

Copy link
Member

@pomadchin pomadchin left a comment

Choose a reason for hiding this comment

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

LGTM!

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

Successfully merging this pull request may close these issues.

S3RangeReader will always produce HEAD request
3 participants