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

NoSuchUpload: The specified upload does not exist #450

Closed
eminugurkenar opened this issue Jun 27, 2022 · 0 comments · Fixed by #470
Closed

NoSuchUpload: The specified upload does not exist #450

eminugurkenar opened this issue Jun 27, 2022 · 0 comments · Fixed by #470
Milestone

Comments

@eminugurkenar
Copy link
Contributor

Recently we started to see the error below , couldn't find anything that retries on this case. It basically fails after getting this error.

ERROR \"cp data s3://data": MultipartUpload: upload multipart failed upload id: IDXXXXXXXXXX caused by: NoSuchUpload: The specified upload does not exist. The upload ID may be invalid, or the upload may have been aborted or completed. status code: 404, request id: PJXXXXX, host id: HOSTIDXX

@ilkinulas ilkinulas added this to the v2.1.0 milestone Jul 7, 2022
@ilkinulas ilkinulas added this to s5cmd Jul 7, 2022
@kucukaslan kucukaslan moved this to Todo in s5cmd Jul 25, 2022
@kucukaslan kucukaslan moved this from Todo to In Progress in s5cmd Jul 29, 2022
igungor pushed a commit that referenced this issue Aug 2, 2022
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
Repository owner moved this from In Progress to Done in s5cmd Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants