-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Abort multi part download if the object is modified during download #3248
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
Conversation
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.
LGTM
@@ -221,6 +221,58 @@ module S3 | |||
end.to raise_error(Aws::Errors::ChecksumError) | |||
end | |||
|
|||
it 'does not download object when ETAG does not match during multipart get by ranges' do | |||
allow(client).to receive(:head_object).with({ |
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.
I guess this is fine seeing as other tests in this file are doing it.. but the tests here should be refactored (transfer manager makes these kind of obsolete anyway).
Detected 1 possible performance regressions:
|
Adds an etag if match statement to the get by parts/ranges functionality during multipart download of the transfer manager. In the event a file is changed mid operation, multipart download will abort and no file will be downloaded.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
To make sure we include your contribution in the release notes, please make sure to add description entry for your changes in the "unreleased changes" section of the
CHANGELOG.md
file (at corresponding gem). For the description entry, please make sure it lives in one line and starts withFeature
orIssue
in the correct format.For generated code changes, please checkout below instructions first:
https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
Thank you for your contribution!