Repository navigation
test(lockservice): bound concurrent duplicate bind regression - #29171
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? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
PASS — reviewed exact head 07368ee against base bc523de.
Read all changed hunks and traced held transactions, concurrent duplicate callbacks, the same-bind early return, subsequent transaction usability, and final unlock/holder cleanup. The bounded scenario preserves identity, create/close and fence oracles. Failure unwinding releases barriers and joins workers before fixture teardown.
Completed focused controls, race-100 and owning-package evidence are available. The guard-removal mutation fails the side-effect assertions, demonstrating regression sensitivity. Exact-head CI is successful.
No P0/P1/P2 blockers found. Coverage was not used as a gate.
## What type of PR is this? - [ ] API-change - [ ] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Fixes #33657 Related to #29165 and the [x86 race UT failures](https://github.com/matrixorigin/matrixone/actions/runs/46850647337/job/143403324427). ## What this PR does / why we need it: - Backport the deterministic duplicate-bind regression from #29171. Two transactions hold shared locks while competing callbacks deliver duplicate binds. The test still verifies table identity, no replacement or fencing, and successful subsequent locking and cleanup. - Run the mutable-tail restart case on two CNs with a test-owned data directory. Retain the cross-CN writes, restart, persisted data and transaction rollback assertions. The post-restart phase has its own deadline and refreshes the restarted CN's TN routing snapshot before beginning the write transaction. A deferred rollback covers assertion failures. Closing the private cluster and removing its directory replaces SQL teardown. - Run the system-catalog clone scenario through the connection pool with a separate cleanup deadline for each database. Cancelling one DROP can no longer close the connection used by subsequent view scenarios. Local validation uses Go 1.26.4 on Linux x86_64 with the CI race flags. The three formerly failing tests and the affected fixture checks passed on the final revision. The full lockservice race suite passed. The duplicate-bind case passed 100 race iterations, and the mutable-tail restart passed two additional race iterations. Incremental SCA passed for `pkg/embed` and `pkg/lockservice`.
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #29165
What this PR does / why we need it:
Replace the 20,000-operation timing-dependent workload in
TestHandleBindChangedConcurrentlywith a bounded concurrent regression scenario. Two transactions hold shared locks while two workers dispatch duplicate bind notifications. Preserve the table identity and zero create/close/fence assertions, then verify both transactions can acquire another row and are removed after unlock.Workers report errors to the test coordinator and always unlock. Cancellation and barrier release happen before joining workers and tearing down the fixture, including assertion failures.
Production behavior is unchanged. The existing duplicate-bind guard is retained; this does not claim a newly proven production deadlock or exact historical CI scheduling cause.
Validation (Go1.26.4, macOS arm64, verified native inputs,
-p 2):pkg/lockservicesuite passed (101.415s).No SQL or wire/storage behavior changed. CI results are pending; no CI wait was performed.