-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
command: retry upload on s3.NoSuchUpload (#470)
With this change, doUpload method will retry the multipart upload on NoSuchUploadError if the no-such-upload-retry-count flag is used with cp or sync and the value of the special metadata in remote file does not match the one placed in upload request (or does not exists at all) . Otherwise (if it is different), it will assume that upload was successful and ignore the error. Retry logic is placed into s3.Put since it is possible to restart upload operation and write unit test there. For the retry condition, it will use a user defined metadata field. If the no-such-upload-retry-count given (with positive parameter), then it will put a random string as a user defined metadata. Then, upon the s3.NoSuchUpload error, it will check if that field matches with the one placed or not. If it does not match (or does not even exists), then the upload will be retried. Fixes #450
- Loading branch information
1 parent
123b1c7
commit 7c90f8a
Showing
6 changed files
with
250 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.