-
Notifications
You must be signed in to change notification settings - Fork 2.8k
AmazonS3.getObject (GetObjectRequest, File) sucks! #485
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
Comments
@almson Thanks for the feedback! I agree with some of your points.
|
Thank you for taking my feedback into consideration!
Generally, you have to trust the OS and the hardware to write to a file what you ask it to write (or nothing would work!). More users are paranoid about performance than file integrity, so I would suggest sticking to the fast stream-based checker. If that's not enough for someone, they're free to re-verify the file on disk as many times as they like. Do you have a reason to think that corruption of the file is more likely than the background probability of RAM, bus, disk failures?
I realize that, however there is a public function in
which will fail whenever it is called with |
I've discussed with a colleague and I've been convinced that the validation on the input stream would be sufficient.
Yes I agree, this code could use some cleanup. I've created tasks on our backlog to address the issues. If there are ones your are particularly frustrated by or passionate about we do accept pull requests. Thanks again for such great feedback! |
Circling back around on these requests: we've made changes around a number of these suggestions so I'm going to go ahead and close this Issue for now. Please feel free to create a new issue if you have other suggestions or find that there are still major issues with getObject. |
More specifically, the code that it delegates to in
com.amazonaws.services.s3.internal.ServiceUtils.retryableDownloadS3ObjectToFile
is flawed. Here are the problems I've identified in the methods for downloading S3 objects to disk:retryableDownloadS3ObjectToFile
is poor. Ideally, it should just use the ClientConfiguration retry logic. The wrong things it current does are:SocketException
, which is the most common exception you'll encounter when downloading large files. Ugh! Utter fail. SDKDefaultRetryCondition will retry on a client exception caused by a SocketExceptionThe text was updated successfully, but these errors were encountered: