Trust restore stamp when source is unresolvable - #1
Open
kw1knode wants to merge 1 commit into
Open
Conversation
Snapshot providers rotate old objects out of their buckets. A failed HTTP resolve produced an empty snapshot identity that invalidated an otherwise-valid stamp, sending the restore path into the non-empty target error on every pod restart. - Skip the restore when a stamp matches the same source, target, checksum, and compression but the source can no longer be resolved. - Stop comparing ToolVersion in StampMatches so image upgrades don't invalidate existing stamps. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Problem
A completed restore writes
.stream-download.stamp, but two things could still invalidate it and send restarts intotarget is non-empty; set WIPE_EXISTING=true to replace(crash-looping the pod):SnapshotIDno longer matches the storedetag:...— so a node that restored successfully days ago suddenly demands a wipe. Observed in production onbase-mainnet-rpc-1after Base rotatedbase-mainnet-reth-1782614844.tar.zst.ToolVersionwas part of the exact stamp equality, so any version bump invalidated every existing stamp the same way.Fix
restore_already_completeand exit 0 instead of falling through to a fresh restore.ToolVersionfrom theStampMatchescomparison (still recorded in the stamp file for info).Tests
TestRunTrustsStampWhenSourceRotated: restore succeeds, server starts returning 404, second run no-ops and leaves data intact.TestRunSkipsRestoreAcrossToolVersions: second run with a bumpedtoolVersionno-ops.🤖 Generated with Claude Code