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

Handle 410 errors on resumable-media operations #26

Open
crwilcox opened this issue Oct 18, 2019 · 3 comments
Open

Handle 410 errors on resumable-media operations #26

crwilcox opened this issue Oct 18, 2019 · 3 comments
Labels
api: storage Issues related to the googleapis/python-storage API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@crwilcox
Copy link
Contributor

A previous issue googleapis/google-cloud-python#7530 was closed in favor of a targeted issue for a feature request.

Resumable media operations can fail in such a way that they cannot be retried, at least on the chunk level. A 410 error indicates that the only choice is to restart the operation altogether

Pseudo code:

try:
   resumable_operation_upload(some_file)
except 410_error:
    # Retry the operation, from the very beginning of the file.

We should find the instances of resumable uploads and protect them from the higher level failure. It is also possible this could be pushed down into resumable media, but these higher level failures are a different category than existing retry-able errors.

Related: https://issuetracker.google.com/137168102 and internal bug 115694647.

@tseaver tseaver changed the title Handle 410 errors on resumable-media operations Storage: Handle 410 errors on resumable-media operations Oct 22, 2019
@crwilcox crwilcox transferred this issue from googleapis/google-cloud-python Jan 31, 2020
@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/python-storage API. label Jan 31, 2020
@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Feb 3, 2020
@frankyn frankyn added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. and removed 🚨 This issue needs some love. triage me I really want to be triaged. labels Feb 4, 2020
@tseaver tseaver changed the title Storage: Handle 410 errors on resumable-media operations Handle 410 errors on resumable-media operations Aug 17, 2020
@andrewsg
Copy link
Contributor

andrewsg commented Nov 2, 2020

Looking at resumable media retries this week. I'm confused by this bug. Under what circumstances will the API issue a 410? That seems like a bizarre error code to issue in response to an upload request.

@crwilcox
Copy link
Contributor Author

crwilcox commented Nov 2, 2020

@andrewsg in practice, our front ends/services can sporadically send a variety of errors, notably unavailable (503) or gone (410). Users (our libraries) should understand how to reattempt.

For the 410 case, an example could be a situation where you are trying to upload a file, but somehow it is deleted, or corrupt. Gone will presumably be returned.

@frankyn
Copy link
Member

frankyn commented Jun 4, 2021

@andrewsg do you think this is still necessary for us to do? I'm hesitant because 410 tells us the resumable upload session was either Deleted by the user or the service (happens after a week). 410 outside of that shouldn't happen and would be a service bug. Additionally, it's difficult to retry a resumable upload from the beginning if we don't have all the data available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/python-storage API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

4 participants