-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
service/s3/s3manager: Downloader ignores byte range #1296
Comments
Thanks for creating this issue @sandoracs. I agree this looks to be an oversight with S3 Download Manager. I think it makes sense for the downloader to use this value. Since the value was being ignored before we'd need to figure out how the SDK should handle this field if it is not formatted properly. |
In the meantime @sandoracs the |
Thank you! |
In taking a look at this issue, it looks to support this feature the S3 Download Manager would need a pretty significant refactor. To address the issue of taking a slice of an Object I think the downloader can be updated to short circuit multipart download functionality and fallback to using We can then see if there is demand for full byte-range support within the download manager and prioritize that as a feature request. |
Fixes the S3 Download Manager ignoring the GetObjectInput's Range parameter. If this parameter is provided it will force the downloader to fallback to a single GetObject request disabling concurrency and automatic part size gets. This can be improved, if there is demand, for the feature to parse the byte range value provided and bulding range gets with it. Fix aws#1296
Fixes the S3 Download Manager ignoring the GetObjectInput's Range parameter. If this parameter is provided it will force the downloader to fallback to a single GetObject request disabling concurrency and automatic part size gets. This can be improved, if there is demand, for the feature to parse the byte range value provided and bulding range gets with it. Fix aws#1296
Fixes the S3 Download Manager ignoring the GetObjectInput's Range parameter. If this parameter is provided it will force the downloader to fallback to a single GetObject request disabling concurrency and automatic part size gets. This can be improved, if there is demand, for the feature to parse the byte range value provided and bulding range gets with it. Fix aws#1296
) Fixes the S3 Download Manager ignoring the GetObjectInput's Range parameter. If this parameter is provided it will force the downloader to fallback to a single GetObject request disabling concurrency and automatic part size gets. Fix #1296
Hi @sandoracs I've just merged in #1311 . This basic support for Byte-Range with the S3 manager. Setting this field will disable S3's concurrency support. We can take a look at adding further support for byte range with multipart get object download as a feature request. |
Hi! Thank you very much! 👍 |
Please fill out the sections below to help us address your issue.
Version of AWS SDK for Go?
v1.8.12-6-gbaba9e7
Version of Go (
go version
)?go version go1.8 darwin/amd64
What issue did you see?
Byte range is ignored by 'downloader.Download()'
Steps to reproduce
`downloader := s3manager.NewDownloader(sess)
f, _ := os.Create("/tmp/data")
defer f.Close()
size, _ = downloader.Download(f, &s3.GetObjectInput{
Bucket: aws.String("bucket"),
Key: aws.String("key"),
Range: aws.String("bytes=0-8191"),
})`
It will download the full object instead of the first 8MB.
The text was updated successfully, but these errors were encountered: