Repository navigation
fix(mount): make -skip-recovery name the slot whose journal it discards - #43
Merged
Merged
Conversation
-skip-recovery discarded the journal of whichever slot the mount took. While a peer held this host's damaged slot, the mount could take another crashed node's slot and overwrite that node's unreplayed journal. Checking that the slot was this host's did not help: a failed mount stamps the slot with this host's name first, so a retry passed. -skip-recovery=N now discards a journal only when the mount takes slot N, the slot named in the recovery error. A mount that takes any other slot logs that it ignores the flag and replays that slot's journal. A bare -skip-recovery is a usage error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mattmattox
force-pushed
the
fix-skip-recovery-own-slot
branch
from
October 24, 2026 23:54
a360725 to
a26e442
Compare
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.
Data-loss guard from the shepherd's review of #34.
-skip-recoverydiscarded the journal of whichever slot the mount took. While a peer held this host's damaged slot, a-skip-recoverymount could take another crashed node's slot and overwrite its unreplayed journal. An earlier version of this PR checked that the slot was this host's. That failed on a retry, because the failed mount had already stamped the slot with this host's name.-skip-recovery=Nnow discards a journal only when the mount takes slot N, the slot named in the recovery error. A mount that takes any other slot logsignoring -skip-recovery=Nand replays that slot's journal as usual. The recovery error names the flag with its slot number.Breaking change: a bare
-skip-recoveryis now a usage error. This is noted in CHANGELOG, README, API-CONFIG, OPERATIONS and TROUBLESHOOTING.cmd/mountchanges by +11/−5.Tests:
TestSkipRecoveryDiscardsOnlyNamedSlotcovers another host's crashed slot, a wrong N, and a retry after the slot was stamped. It fails on main and passes here, along with the other journal-slot tests. golangci-lint passes. In the integration-shortrun, 90 tests passed andTestSurvivorReleasesCrashedNodeLocksfailed once on timing (node B wrote before it logged the takeover). It then passed 3× on this build; it doesn't touch this code path.🤖 Generated with Claude Code