Repository navigation
fix(snapshot): check ignored errors and enforce errcheck in internal/snapshot - #108
Merged
Merged
Conversation
…snapshot - The snapshot registry dropped the error from releasing its lock. ErrNotLockOwner there means a double release, which may have dropped another holder's registry lock early so two writers updated descriptors at once. It is now logged as an error; other release failures log a warning. - Tests check setup steps (Create, UpdateState, Delete, Scan) and discard cleanup errors explicitly. errcheck now covers internal/snapshot; 398 findings remain elsewhere. Co-Authored-By: Claude Opus 5.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.
Fixes all 48 errcheck findings in
internal/snapshotand adds the package to the errcheckpath-exceptrule. 398 findings remain elsewhere.journal, storage and refcount, the other packages on the PM's list, have been enforced since #31.
Ignored error that could hide corruption: the registry released its lock in five places and ignored the result. If
ReleasereturnsErrNotLockOwner, this node released the lock twice. The extra release may have dropped another holder's lock early, letting two writers update snapshot descriptors at once. That case is now an[ERROR], and other release failures are a[WARN]. This is the same handling #95 gave the inode table.Tests: setup calls (
Create,UpdateState,Delete,Scan, and the benchmark loops) now fail the test on error. Cleanup errors are discarded explicitly. #103 also editsworker_test.go, at its imports and from line 654; this PR changes lines 42–61, so they shouldn't conflict.🤖 Generated with Claude Code