Skip to content

pool: the release-meets-resize test waits until the release blocks on the old record - #678

Merged
CMGS merged 1 commit into
mainfrom
release-test-waiter
Dec 1, 2026
Merged

CMGS merged 1 commit into
mainfrom
release-test-waiter

Conversation

@CMGS

@CMGS CMGS commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Stacked on #677 (base pool-cleanup). Test only, one line.

TestAReleaseThatMeetsAResizeReleasesTheResizedClaim started the release from the resize hook and then slept 10 ms before it let the resize go on. If the release goroutine first resolved the id after the resize had finished, it found the new record at once, and the test passed without the ErrReplaced retry in Manager.Release.

The hook now calls the package's waitLockWaiter on the releaseRowed frame: the resize goes on only when the release holds the old record and waits on its transition lock. releaseRowed is reached only after resolve returned a record, and while the hook blocks that record is the old one.

Checks

  • The test, -race -count=50: ok.
  • Mutant (the retry loop removed from Release), -race -count=30: 30 of 30 fail, idle and under CPU load (24 busy loops on 12 CPUs), with release that met the resize = sandbox changed while the call waited; retry, want nil.
  • The old test against the same mutant under the same load also failed 30 of 30: the weakness did not show on this machine. The change removes the timing assumption; it does not fix an observed false pass.
  • Gate on both GOOS: lint 10 × 0 issues., asl and fmt clean, comments +0 −0, darwin and linux race tests green.

No production code changes; no hot-path cost.

@CMGS
CMGS changed the base branch from pool-cleanup to main December 1, 2026 11:32
@CMGS
CMGS force-pushed the release-test-waiter branch from 0170982 to 23d870d Compare December 1, 2026 11:33
@CMGS
CMGS merged commit c6ce4bc into main Dec 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant