Let a purge survive a store that fails a few deletes per pass - #302
Merged
Conversation
Purging Goeree-Overflakkee listed tens of thousands of objects, and the store failed a handful of deletes per pass with a 5xx; one such failure aborted the whole pass and the next attempt started from the beginning, so the purge never finished. Each delete now gets the read path's ceiling and a short retry, a key that still fails does not stop the others, and a pass reports its leftovers at the end for the next pass to find. Also: purge_source.ts resolves the source through the projectable lookup, so a source that was switched off in the catalog (the step before its data is removed) can be purged with the live image instead of an old one.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found while purging the unapproved sources of #277.
Purging Goeree-Overflakkee lists tens of thousands of objects; Hetzner's store answers a handful of deletes per pass with a 5xx. One such failure threw out of
deleteObjects,deleteByPrefixaborted the pass, andpurge_source.tsretried the whole prefix from the beginning, five times, each time hitting another transient failure somewhere in the list: three hours on one source, nothing finished.deleteObject(new, private): the read path's timeout, four attempts with a short back-off, 404 counts as done, other 4xx not retried.deleteObjects: every key is tried; failures are reported together at the end instead of stopping the batch.deleteByPrefix: a page whose deletes partly failed does not stop the pass; leftovers are reported at the end and are still listed for the next pass, which the purge script's own retry provides.purge_source.tsresolves throughgetProjectableSource, so a source switched off in the catalog (the step before removing its data) can be purged with the live image; the runnable lookup refused exactly those today.Tests: a key that keeps failing does not block the others; a key that fails once is retried, and a 404 is success.