Repository navigation
test: decouple MongoDB lease UT from port availability - #28884
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? |
f9c67f2 to
43c8c4e
Compare
|
CI triage/rebase update for head
No speculative production change was added to this test PR; the base fix remains queued under #28313. CI after the rebase is intentionally not awaited. |
564d644 to
3d7f4f7
Compare
3d7f4f7 to
3489a6b
Compare
|
Rebased the existing feature ref onto latest |
XuPeng-SH
left a comment
There was a problem hiding this comment.
GPT-6 medium deep review at exact head 3489a6b\n\nNo concrete correctness or lifecycle findings. The tests establish real lock contention and same-file reacquisition after parent death.\n\nValidation closure remains pending: please attach revision-linked terminal output for each changed test's reported focused race repetitions and the normal ./test/mongodb package run. Exact-head CI is green and selects the package under race mode, but does not establish those additional runs.\n\nCOMMENT only because this PR is self-authored.
…28884) ## 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 matrixorigin#28882 ## What this PR does / why we need it: The parent-death test used the full port planner to check whether a flock lease had been released. The allocator acquires the flock first and only then probes the 80 ports, so unrelated host port occupancy could make the test report a lease failure even when the lock was free. Add an internal lease-only profile that reuses the existing acquisition/release logic without probing ports. The parent-death test now verifies actual lock contention and acquisition on the same lock file. The neighboring cross-process test still verifies that different TMPDIR values share the host-default lease namespace and requires the exact lease-conflict error. Production port allocation, availability checks, and host-wide locking are unchanged. Validation (macOS): `bash -n optools/mongodb_ci.bash`; focused lease tests; each changed test passed `-race -count=100`; `GOWORK=off go test -mod=readonly -timeout 120s ./test/mongodb`.
…28884) ## 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 matrixorigin#28882 ## What this PR does / why we need it: The parent-death test used the full port planner to check whether a flock lease had been released. The allocator acquires the flock first and only then probes the 80 ports, so unrelated host port occupancy could make the test report a lease failure even when the lock was free. Add an internal lease-only profile that reuses the existing acquisition/release logic without probing ports. The parent-death test now verifies actual lock contention and acquisition on the same lock file. The neighboring cross-process test still verifies that different TMPDIR values share the host-default lease namespace and requires the exact lease-conflict error. Production port allocation, availability checks, and host-wide locking are unchanged. Validation (macOS): `bash -n optools/mongodb_ci.bash`; focused lease tests; each changed test passed `-race -count=100`; `GOWORK=off go test -mod=readonly -timeout 120s ./test/mongodb`.
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #28882
What this PR does / why we need it:
The parent-death test used the full port planner to check whether a flock lease had been released. The allocator acquires the flock first and only then probes the 80 ports, so unrelated host port occupancy could make the test report a lease failure even when the lock was free.
Add an internal lease-only profile that reuses the existing acquisition/release logic without probing ports. The parent-death test now verifies actual lock contention and acquisition on the same lock file. The neighboring cross-process test still verifies that different TMPDIR values share the host-default lease namespace and requires the exact lease-conflict error.
Production port allocation, availability checks, and host-wide locking are unchanged.
Validation (macOS):
bash -n optools/mongodb_ci.bash; focused lease tests; each changed test passed-race -count=100;GOWORK=off go test -mod=readonly -timeout 120s ./test/mongodb.