Repository navigation
[4.2-dev] fix(lockservice): release blocked waiters once - #33192
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
This pull request is merged. |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 974e8e2a2095f4809eb0bebb99a0955a90d89849
Assessment: approve
The change detaches the transaction-owned blocked waiter list before notifying and releasing its references. Retryable close and subsequent waiter cleanup therefore cannot release the same list entries twice. Production close and lock cleanup use the transaction mutex, and the change reuses the existing waiter ownership and notification lifecycle without adding state. The linked CI panic has not been established as the same failure.
Model: gpt-6.1-terra / max
Session: 01a20ed3-c62c-76c0-ab72-cd3b54900431 · slot 2 · generation 2
Validation:
-
Private temporary-directory and loopback preflight passed (preflight.log; checks/1795573903680050650-3.json).
-
At the clean frozen head, the new waiter regression and the existing retryable-unlock and canceled-lookup tests each passed three times under the race detector with the assigned test executor (focused-race-fingerprinted.log; checks/1795574214249660380-3.json).
-
A Go overlay replacing only txn.go with the verified base blob caused the head regression to fail at its stale-list assertion, as expected (baseline-proof.log, baseline-control.log; checks/1795574150748547425-3.json and checks/1795574183026613123-3.json).
-
The base-to-head whitespace check passed (diff-check.log; checks/1795573903651390621-3.json). An independent blob comparison matched all 51 tracked lockservice and module files to the frozen head and found no additional Go files in lockservice (source-proof.log; checks/1795574096295628085-3.json).
Limitations:
-
The captured shared build, Ubuntu unit tests and coverage jobs were still in progress.
-
The author reported a full lockservice race run with identical production code and ten runs of the final regression, but raw logs were not supplied. The earlier timing-dependent CI panic remains unproven as the same defect.
What type of PR is this?
Which issue(s) this PR fixes:
Related to #32744
What this PR does / why we need it:
A retryable transaction close cancels blocked waiters and releases the transaction's references, but leaves those waiters in the transaction's list. A subsequent close or waiter cleanup can release the same references again. Detach the list before notification and release, so every transaction-owned waiter reference is released once. Add a regression that checks notification and repeated close.
This defect was reproduced on the clean
4.2-devbase while investigating the waiter refcount panic in CI run 45447474016. The earlier reference drop in that CI failure was not established, so the reproduction does not prove that this change alone fixes that failure.Validation on Linux amd64, Go 1.26.6:
pkg/lockserviceonce under-racewith identical production code; the final changed test passed 10 times under-race.gofmt,go vet, andgolangci-lint --new-from-revforpkg/lockservice.