Skip to content

gazctl shards prune: retry transient fragment removal errors - #493

Merged
williamhbaker merged 1 commit into
masterfrom
wb/prune-retry-transient-deletes
Aug 24, 2026
Merged

gazctl shards prune: retry transient fragment removal errors#493
williamhbaker merged 1 commit into
masterfrom
wb/prune-retry-transient-deletes

Conversation

@williamhbaker

@williamhbaker williamhbaker commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Object deletes fail intermittently with errors which resolve on their own: 5xx responses, rate limits, and dropped connections. The GCS client does not retry a delete having no preconditions, so a single such error counts as a failed removal and fails the whole prune with exit 1, alerting on cleanup which would have succeeded on a second attempt.

Retry a failed removal up to three times, a second apart. Authorization failures are returned as before, without retry, and remain counted as a non-fatal permissionDenied.

There's a known gap with this implementation where on GCS a deletion might actually succeed but the success response gets lost coming back to us, and then we retry and get a 404 and fail. I haven't seen that actually happen yet conclusively, so I'll worry about that later.

Object deletes fail intermittently with errors which resolve on their
own: 5xx responses, rate limits, and dropped connections. The GCS client
does not retry a delete having no preconditions, so a single such error
counts as a failed removal and fails the whole prune with exit 1,
alerting on cleanup which would have succeeded on a second attempt.

Retry a failed removal up to three times, a second apart. Authorization
failures are returned as before, without retry, and remain counted as a
non-fatal permissionDenied.

@dgreer-dev dgreer-dev left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Is a second too short for the retry?

@williamhbaker

Copy link
Copy Markdown
Contributor Author

Is a second too short for the retry?

I'm assuming these are very transient errors where a retry would immediately resolve. It's possible that 1 second would be too short though if it's something other than that. If we see the failures continue I'll tune it; hopefully it isn't an issue though.

In the somewhat near future I'm planning on making larger changes to our recovery log / pruning architecture in Flow so just trying to get by until then.

@williamhbaker
williamhbaker merged commit f481dfc into master Aug 24, 2026
1 check passed
@williamhbaker
williamhbaker deleted the wb/prune-retry-transient-deletes branch August 24, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants