Repository navigation
test: reduce embedded SQL race fixture work on 4.2-dev - #33631
Merged
XuPeng-SH merged 1 commit intoDec 2, 2026
Merged
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? |
Contributor
|
This pull request is merged. |
Contributor
Author
|
mo-bot review · Commit: "interrupted" |
1 task done
XuPeng-SH
added a commit
that referenced
this pull request
Dec 2, 2026
…33634) ## What type of PR is this? - [x] Test and CI ## Why this change Four successful UT Racing jobs targeting `main` showed repeated embedded cluster bootstrap and expensive planner setup. One job started 157 embedded clusters. The recurring costs included starting a race-instrumented process for each recursive CTE shape and creating a new catalog for SQL tests that use the same cluster configuration. [UT Racing run 46765442646](https://github.com/matrixorigin/matrixone/actions/runs/46765442646/job/143068002556) · [UT Racing run 46722755645](https://github.com/matrixorigin/matrixone/actions/runs/46722755645/job/142913419828) ## What changed - Run all 16 recursive CTE shapes and the same-context recovery sequence in one child with a stack limit and deadline. Each independent shape gets a fresh compiler context. Use the first generated column that exceeds the expansion budget for the historical catalog test, and retain both SELECT and UPDATE plan checks. - Reuse the existing embedded fixtures for compatible SQL, inventory CAS and multi-CN scenarios. Tests that restart services or change settings retain dedicated clusters. Exercise publication lock escalation with the smallest set of tenants that still proves the locked target and the unlocked gap. Remove a view rebuild immediately before dropping its tenant. - Halve the set-operation input while retaining assertions on physical owner placement, SQL results, remote failure, cancellation and recovery. Use a real 4,093-node CTE plan for the result-metadata allocation check. The 12-level benchmark remains available. ## Measurements Local paired runs used the race detector. Timings below apply to the named tests. The package groups run in parallel in CI, so measuring the full-lane gain requires a comparable runner. | Workload | Base | With this change | | --- | ---: | ---: | | Recursive CTE and generated-column tests, three cases | 71.5 s, 17 child processes | 6.5 s, 1 child process | | Integer result-column metadata | 18.75 s | 2.06 s | | Five embedded tests | 128.5 s, 5 cluster starts | 69.2 s, 3 cluster starts | | Full inventory CAS suite | 9 starts, 1,363 relation-create events | 7 starts, 1,025 events | | Full multi-CN SQL integration package | 11 starts, 1,871 relation-create events | 9 starts, 1,533 events | | Set membership owners, `GOMAXPROCS=8` | 28.4 s, 8 owners | 17.4 s, 8 owners | For the set-operation tests at CI's `GOMAXPROCS=2`, the owner and low-budget cases together took 44.4 s on base and 47.5 s with the change. Both exercised two owners and had the same four CPU-dependent subtest skips. The eight-owner run exercised all four witnesses. Catalog event counts measure setup operations. Physical disk bytes were not measured. ## Validation - On the rebased head, all 22 targeted top-level tests across the seven changed packages passed with `-race -short -tags matrixone_test -count=1`. - The full multi-CN package and all six inventory CAS tests passed on both sides of the local comparison. Four embedded tests also passed three times against a reused cluster. - Forcing the planner to build the boolean-source graph in a local negative control made the result-metadata test fail at 5,182 allocations against its limit of 32. - Incremental SCA reported zero issues across the seven packages. A local attempt at all four CI SQL integration batches exceeded the workstation's memory capacity and hit baseline timeouts. It is excluded from the timing comparison. The related change for `4.2-dev` is tracked separately. [4.2-dev PR #33631](#33631)
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
Which issue(s) this PR fixes:
Related to #32744.
What this PR does / why we need it:
On the latest successful 4.2-dev UT Racing job reviewed, the two publication lock tests took 104 s and 85 s. A table metadata check took 635 s, including time spent acquiring the embedded cluster admission lock used by other test processes. The three successful jobs reviewed took 59–68 minutes. UT Racing #33520 · #32497 · #31979
Validation
Local serial comparison against
232d2dec6d, using prebuilt test binaries, the CI-short -race -tags matrixone_testsettings andGOMAXPROCS=8. The seven groups below include process startup and teardown. Filesystem output is measured by Linux process I/O accounting and includes the test logs.In this comparison wall time fell by 99.8 s (30.4%). CPU time went from 184.0 to 131.2 s and filesystem output from 211.7 to 147.0 MiB.
The combined file DIFF/PICK group took 5.2 s longer in this pair. Its first test database creation occurred 24.3 s after the first server log on the PR and 16.8 s on the base. PICK itself took 10.6 s on the PR and 14.2 s on the base.
The full DDL package, neighboring PICK and checkpoint regressions, two consecutive runs of both multi-CN publication tests, and independently selected plan, quota and conflict cases passed with the race detector. The non-short 819,200-row DIFF and 100,000-row CSV round trip also passed. Incremental golangci-lint reported zero issues.
The parallel CI job also includes build time and contention across packages. Its end-to-end improvement needs a new runner measurement.