Repository navigation
test: prove the write gate stops a stalled node's queued write - #118
Merged
Merged
Conversation
A node stopped while a writer writes through it resumes after a peer has replayed it and written the file. GOCLUSTERFS_TEST_HEARTBEAT_HOLD, a test-only setting, holds its heartbeat after the pause, so the queued write reaches the device before the heartbeat notices the lost slot. The Go and VM tests check that the write gate stops the node and the peer's data stays byte for byte. Without the gate both fail: the stalled write lands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Follow-up to #92, which the PM asked for: a test that proves the write gate end to end, in Go and on VMs.
A node is stopped while a writer writes through it. A peer proves it dead, replays its journal and writes the file. Then the stopped node resumes. Without help, its heartbeat goroutine usually notices the lost slot and exits before the queued write reaches the device, so a test like this passed even with the gate off.
GOCLUSTERFS_TEST_HEARTBEAT_HOLD, a test-only setting, holds the heartbeat after a pause. The queued write then reaches the gate first, and only the gate can stop it. A node with the setting logs a warning at startup.Both tests check, in this order:
Results on .68:
TestStalledNodesWritesStopAtWriteGateAAAA…, so the stalled write landedtest_stalled_node_writes_stop_at_write_gateAlso:
MountedFS.Env, and a third argument tosetup_goclusterfs).VM_TEST_ONLYruns only the VM tests whose names contain it.🤖 Generated with Claude Code