Repository navigation
ci: reduce race UT work and harden fixture retirement - #32872
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: 369ce844cb097599f138222cfe98975f3e18d408
Assessment: approve
The patch joins the disk-cache fill before temporary-directory cleanup and removes repeated test setup while preserving the distinct planner, collation, CAS, and CTAS checks.
Model: gpt-6.2-sol / xhigh
Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0
Validation:
-
Focused race checks passed across all four affected packages, including all five merged CAS cells, 24 strict CTAS cases, and 20 runtime CTAS expression checks.
-
All nine tests that use the download fixture passed together under race detection. The cancellation and abandoned-fill tests each passed 100 repetitions. Removing the join in a test overlay reproduced the abandoned-fill failure in 9 of 10 runs.
-
Preflight, gofmt, and diff whitespace checks passed. The commands, receipts, and retained logs are indexed in validation-report.json.
Limitations:
-
The broader local runs reached their suite timeouts in the unchanged TestLocalFS and TestInventoryCASRCTransfer cases. Focused reruns of the affected tests passed.
-
CI UT and SCA were pending in the frozen snapshot. Performance figures are author-reported.
XuPeng-SH
left a comment
There was a problem hiding this comment.
Assessment: changes needed — original test coverage is reduced.
Static review of base 517e1695388cbaf1135238d5ab0c19a4556fb551 and head 369ce844cb097599f138222cfe98975f3e18d408 found these lost execution paths:
- Budget reuse across complete plans: the old test built two 129-branch plans with the same compiler context. The new test exercises 129 branches through a helper but builds only 2- and 3-branch complete plans. A budget leak confined to binding complete plans could therefore escape the new test. Old · New
- Mode 2 at the planner boundary: the old test built a complete 256-branch plan in both lower-case modes. At that size, the new mode-2 case calls the visibility helper rather than building the complete plan. It no longer checks mode-2 binding and scan counts at the boundary. New
- Collation repair: the old cases committed each of seven field corruptions and exercised the real tenant upgrade. The new cases run the full repair for one corruption; the other six check the upgrade predicate in rolled-back transactions, so those cases no longer verify that the real upgrade repairs their particular corrupted rows. Old · New
- Non-strict CTAS: five runtime expressions previously ran in separate two-column CTAS statements; they now run together in a six-column CTAS. The new row-specific NULL assertion is stronger, but it does not exercise the former individual statement shapes. The strict error cases and constant expression remain separate. Old · New
Please retain those end-to-end paths, or supply equivalent coverage of them, while optimizing elsewhere. Matching the mapped test-outcome count alone does not establish equivalent execution coverage.
Limits: This is a source-only review. I did not run the tests or mutations and am not asserting that any production defect currently exists. I have not exhaustively established whether other repository tests cover each omitted path.
|
mo-bot review · Commit: New discussion was assessed; the previous review remains unchanged. |
|
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: 2a50840e49dc2f80ec4c74da9a790abf4831ffdf
Assessment: approve
The disk-cache fixture now joins its writer before cleanup. The CDC test can proceed after a final withdrawal timeout only when the old cluster reports complete teardown and the close result contains no separate failure. The reduced test matrix preserves the distinct planner, collation repair, CAS isolation, and CTAS result and cleanup checks raised in the prior review.
Model: gpt-6.2-sol / xhigh
Session: 01a1a004-90c3-73b1-acc9-3d4636452003 · slot 0 · generation 0
Validation:
-
Focused race checks passed across six packages, including all five merged CAS cases, seven collation field cases, 24 strict CTAS cases, and 20 runtime CTAS expression checks. See focused.jsonl and receipt 1794965848653489940-2.json.
-
Seven additional race controls passed, including completed and incomplete close ownership, stale cleanup isolation, and end-to-end mode-2 subscription binding. See controls.jsonl and receipt 1794965860117032919-2.json.
-
Verified retained race evidence against unchanged disk-cache inputs. Both lifecycle tests passed 100 repetitions, and removing the join reproduced the regression in 9 of 10 runs. Preflight, frozen-source verification, gofmt, and diff whitespace checks passed. Receipts and logs are indexed in validation-report.json.
Limitations:
- Full CI was pending in the frozen snapshot. The review did not rerun the full CI batch or reproduce the underlying HAKeeper Raft stall. Performance figures remain author-reported.
What type of PR is this?
Which issue(s) this PR fixes:
Refs #32745 (FLAKY-001). The issue is a long-lived tracker and should remain open.
What this PR does / why we need it:
Reduce repeated race-test cluster setup and large query construction while retaining the distinct contracts:
errors.Isidentity. When the CDC test explicitly discards an entire old test topology, proceed after a withdrawal timeout only if all owners, including its HAKeeper, are completely released and the error tree contains no other error. Log the diagnostic; ordinary CN and shared-fixture close behavior remains strict.Validation (Linux, Go 1.27.1,
-race -short -tags matrixone_test,GOMAXPROCS=2):pkg/tests/sqlintegration,pkg/fileservice,pkg/cnservice, andpkg/embedrace packages passed. The first full embed run failed in an unrelated allocation-headroom case while other work was running; that case passed on the base and the complete package passed on retry without concurrent static analysis. The subscription-statistics planner race suite and the full CTAS root passed. Production collation upgrade/check tests passed under race.static-check-selectedpassed forpkg/fileservice,pkg/tests/sqlintegration,pkg/sql/plan,pkg/tests/issues,pkg/cnservice, andpkg/embed(molint and golangci-lint, 0 issues); gofmt was clean.Local performance observations (not predicted whole-CI savings):
Design and review: gpt-6.2-sol, xhigh. Full CI remains pending.
The CI failure in the old head occurred during shutdown of a previous single-CN fixture: its final admission withdrawal timed out while HAKeeper Raft proposals were timing out. The scoped discard avoids failing the next unrelated test after complete local topology destruction; it does not establish or repair the underlying Raft stall. The original CI job was re-run to collect independent evidence.