Repository navigation
Fix daemon claim races and reduce redundant race-test work - #31942
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? |
|
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: ea1a38bfd2ea1af016aead6b58826e0c33cbc4bd
Assessment: request_changes
One P2 scope-contract finding remains. Taskservice normal and race suites passed; source review found no additional demonstrated regression.
Model: gpt-6-astra / xhigh
Session: 01a1869d-820c-7212-9788-aecfb86a4141 · slot 0 · generation 2
- P2
pkg/tests/sqlintegration/decimal_integer_division_test.go:28: This PR bundles daemon/CDC correctness fixes with independent DIV, planner-witness, and snapshot/publication test optimizations.
Impact: The bundle violates the linked issue's focused-PR requirement and couples otherwise independent validation and rollback. This is a scope/design finding, not a demonstrated runtime defect.
Evidence: Frozen linked issue #29249 requires independently reviewable, verifiable, and revertible PRs and explicitly says: "Do not bundle unrelated refactors into a daily PR." Changes in decimal_integer_division_test.go, float_string_scope_session_test.go, and snapshot_publication_replay_test.go have no implementation dependency on the daemon fixes. The frozen discussion records no scope exception. Separate these test optimizations into focused PRs.
Validation:
-
Reviewed the complete 25-file delta, affected owners and consumers, linked issue context, and both discussion entries; saved review-plan.md and discussion-assessment.json.
-
Isolation preflight passed. Native reuse was qualified against 193 current input hashes and 13 output hashes.
-
Taskservice normal suite passed: 255 top-level tests, zero skips, -short -tags=matrixone_test -count=1 with assigned test-exec. Receipt: checks/1793416735230184211-3.json; log: taskservice-normal.jsonl.
-
Taskservice race suite passed with the same selection: 255 top-level tests, zero skips. Receipt: checks/1793416840275487741-3.json; log: taskservice-race.jsonl.
-
Final receipt/log audit passed and confirmed the exact head and unchanged source. Receipt: checks/1793417016499380609-3.json; report: validation-audit.json.
Limitations:
-
Broader frontend, compiler, CN, embed and SQL integration execution was deferred after the scope finding; source review does not constitute full runtime validation.
-
Author-reported broader tests and performance improvements were not independently verified. Frozen CI includes incomplete and cancelled checks.
ea1a38b to
e5acebd
Compare
|
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: e5acebd109b8394a659535e8399c12afb603b5a3
Assessment: approve
No actionable regressions found. Claim fencing, CDC failure handling and retained test coverage are coherent. The explicit tracker-owner exception resolves the previous scope objection.
Model: gpt-6-astra / xhigh
Session: 01a1869d-999c-7481-b340-ae4a63e8cee4 · slot 1 · generation 2
Validation:
-
Reviewed all 25 changed files and reconciled all four discussion items.
-
Taskservice, compiler and CN-service suites passed normal/race checks; planner and SQL integration suites passed normal checks.
-
Real-driver daemon claims, two-CN CDC concurrency and snapshot/publication tests passed under race detection.
-
Four focused claim/lifecycle tests each passed 100 race repetitions. All affected frontend tests passed.
-
Go vet passed all seven affected packages. Preflight, native provenance and source cleanliness verified.
-
Commands, exits, source fingerprints and retained logs reconciled in /home/xupeng/.local/state/mo-bot/jobs/df786e86cf8c52d4ce9c1fbe/attempt-2/validation-audit.json.
Limitations:
-
Full frontend normal/race runs failed solely because unchanged Test_openNewFile_nilCtx writes into the read-only checkout; neither package run is counted as passing.
-
External MySQL BVT, full CI and reported performance improvements were not independently reproduced.
-
The acknowledged historical queued-pause/HAKeeper issue is not declared resolved.
What type of PR is this?
Which issue(s) this PR fixes:
Refs #29249
What this PR does / why we need it:
Scope: the owner explicitly requested one PR for the related UT-racing fixes and meaningful test optimizations (rather than separate small PRs). #29249 is referenced as the ongoing quality tracker; this combined scope follows that task-specific request.
The combined scope is an owner-approved exception to #29249's usual focused daily-cleanup PR rule. The independent test-only changes have these retained coverage boundaries:
NO_UNSIGNED_SUBTRACTION, database recreation and teardown checks.The three test-only files have no implementation dependency on the daemon/CDC corrections and can each be restored to the PR base in a separate follow-up patch, with focused validation. This PR is delivered as one commit: reverting that commit rolls back all groups together. The owner accepts that combined review and rollback scope; the test optimizations do not extend the CDC correctness guarantees below.
CDC and daemon control can overwrite a newer owner or heartbeat, report success after a failed commit or partial SQL read, or publish Paused while a reader is still running. A queued daemon start can also claim a different generation, and using a logical claim timestamp for lease expiry can incorrectly steal a freshly renewed task when the previous timestamp is in the future.
Local race comparisons (same machine and flags; individual test times, not whole-CI claims): planner witnesses 137.30s → 121.07s; DIV 35.97s → 30.53s and 31.45s → 26.53s; snapshot/publication 35.96s → 29.58s.
Existing validation (author-reported; not rerun for this metadata-only clarification):
go vetwith the repository CGo setup. Fast concurrency/claim regressions passed 100 local race repetitions; the two-CN interleaving passed four.Remaining work: the original race CI failure still needs a safe fix. HAKeeper requests timed out while CDC pause was pending, but the exact blocking path is not proven. A queued pause can act on a replacement claim or old local routine; deterministic local reproductions cover foreign ownership and local object replacement. Simply rejecting the old routine can leave a legacy Publication executor running or its pause request permanently pending. Prioritizing the existing handler without first addressing ownership, lifecycle completion and shared watermark state can introduce cross-generation errors; this PR does not claim that issue is fixed. Existing concurrent CDC/generic status races and mixed-version stale writers also remain outside the guarantees above.