Repository navigation
test(goclusterfs): give the snapshot and lock test helpers a full lock region - #88
Merged
Merged
Conversation
…k region Since #29 a lock record is a 256 KB row, so the snapshot helper's 512 KB region held 2 records and the lock-commit helper's 1 MB held 4. Locks of different types shared records, a claim went stale after 15s, and TestCopyOnWriteKeepsConcurrentInPlaceWrite could read old data. Both helpers now use superblock.LockRegionSize. The test that needs an inode and a block lock in one record keeps a 4-record region. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A hold still cached when the device closes stays claimed until it goes stale, so the next node waited 15s. Taken from #87. 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.
Since #29 a lock record is a 256 KB row.
openSnapshotFShad 512 KB of locks (2 records) and the lock-commit helper had 1 MB (4 records), so locks of different types shared records and a claim went stale after 15s. Both helpers now usesuperblock.LockRegionSize, and they release cached holds when a test ends (from #87).TestWriteWhenInodeAndBlockShareLockRecordkeeps a 4-record region on purpose, because it needs a collision.On .68 (main cddbaf5 vs this branch):
TestCopyOnWriteKeepsConcurrentInPlaceWrite: main failed 1/5 ("inode 3: data mismatch at offset 0") and took 15s per run; the branch passed 5/5 in 0.1s.TestSnapshotKeepsDataThroughWrites: 15.2s → 0.2s.goclusterfspackage with -short: 99s → 68s. That includes test(goclusterfs): give test nodes a full lock region and release kept holds before closing #87's cleanups, which release cached holds before a test device closes so they don't go stale.The dir, inode and bitmap tests also use 4-record regions, but they don't wait (1–2s per package), so they're unchanged. Works with #85: regions under 256 rows fall back to the shared hash.
Not fixed here: three crash tests still wait 15s, because
remountAndReplaydoesn't adopt the crashed node's claims the waycmd/mountdoes (AdoptOwner).🤖 Generated with Claude Code