Repository navigation
test(lock): let every worker join the hold in the concurrent acquire test - #89
Merged
Merged
Conversation
…test Each worker keeps the lock until all four have acquired it. A worker that the scheduler started more than HoldTurn (250ms) after the first waits for the holders to drain, so under load or -race the workers waited on each other until their 1s limit. The test now keeps the turn open. 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.
Test-only. This is the internal/lock -race flake the #81 author saw at .68 load. It showed up in a 3×50-run
go test -raceloop of internal/lock on main cddbaf5 on .66, once with-cpu 1.TestConcurrentAcquireOnOneNodeKeepsOtherNodesOut has each worker hold the lock until all four have it. A node lets new holders join a hold for only
HoldTurn(250ms). A worker that started later waits for the holders to drain, and the holders were waiting for that worker. Three workers gave up after 1s, blocked on their own node's claim.holdTurnat 1ms, main fails every run in iteration 1. With this change it passes.-race -cpu 1.🤖 Generated with Claude Code