Repository navigation
test: reduce high-cost integration fixtures deterministically - #27613
Merged
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? |
XuPeng-SH
force-pushed
the
codex/optimize-data-branch-ut-fixtures
branch
from
August 26, 2026 01:41
8b9b29b to
da8d6e1
Compare
1 task done
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
…origin#27613) ## What type of PR is this? - [ ] API-change - [ ] BUG - [x] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [x] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#27571 ## What this PR does / why we need it: This reduces high-cost integration-test setup while preserving the original semantic matrices and strengthening deterministic oracles. No production code is changed. ### Data Branch DML fixtures - Shares database and cluster fixtures across compatible diff, pick, and regression scenarios while keeping isolated tables and fresh-context cleanup. - Replaces oversized inputs with the smallest structural boundaries that retain multiple object blocks, three blocks plus a tail, and two 8192-key pick chunks plus untouched rows. - Keeps conflict policies, key types/coercion, mixed DML, snapshots, transaction rejection, remote multi-CN scope, and unhappy paths. - Replaces log-only/no-error checks with exact chunk layouts, affected-row counts, unchanged-state checks, and exact result sets. - Reduces issue 26568 from 260,000 generated values to two matching rows per side because its renderer contract is driven by explicitly patched optimizer statistics. ### High-cost issues and resource fixtures - Keeps the issue 26095 matrix at 2 account contexts x 3 deletion entry points. Table deletion retains the reported four independent sessions, but removes duplicate system-account rounds. A ready barrier admits every connection before release; catalog rows, branch snapshots, and object deletion are checked exactly. - Builds the issue 26123 source schema once and copies it once per Data Branch/CLONE mode. All 2 modes x 3 LIKE-metacharacter identifiers remain named subtests, including collision tables, exact FK catalog identity, copied rows, and rejected invalid FK writes. - Reduces issue 26131 from 100,000 lineitem rows to two real SUM groups with four rows. EXPLAIN now requires exactly one lineitem producer and exactly two Sink Scan consumers, and the result is exact. - Derives TestLockNeedUpgrade input from the real MaxLockRowCount boundary (10,002 rows in the default cluster instead of 20,000 twice). Both local-owner and remote-proxy paths inspect the live lock service for range-lock coarsening and verify the terminal row count. - Reduces the broadcast hard-budget fixture from 200,000 to 66,048 rows while retaining the grouped-child/broadcast topology, controlled OOM classification, no-spill assertion, no partial result, and post-error health check. - Reduces the eight-worker HashBuild recovery fixture from 1,000,000 to 786,944 rows while retaining the original 28 MiB cap, late map-admission recovery, expression-key shuffle topology, exact result, spill metric, and post-query health check. ### Metadata and account integration fixtures - Reuses one source database for ordinary internal-looking tables and fulltext storage across Data Branch and CLONE. The 2 copy modes, 3 ordinary names, hidden fulltext storage, and copied data remain exact named assertions. - Reuses one branch lineage across the 3 delete-validation identifier cases. Each case still independently proves the exact rejection and unchanged row, while cleanup now removes snapshots on failure. - Batches issue 26232 `information_schema.columns` and `DESC` reads without removing any per-view or per-column default assertion. - Replaces issue 26111's three open-ended internal catalog polling loops with direct target-tenant SQL checks after the cross-account DDL commits. Cyclic rows, both FK catalog entries, both invalid writes, duplicate-create state, and session restoration are still checked exactly through the public user path. ### Coverage and timing evidence - DML A/B coverage across frontend, compile, and plan increased from 26.7% to 27.4%; the frontend data_branch target has no baseline-only blocks, and data_branch_pick.go keeps the exact same covered-block set. - Instrumented HashBuild/HashJoin/Group A/B coverage increased from 45.0% to 45.1%. The late map-admission and recovery blocks are retained; residual block-set differences are limited to concurrent spill-buffer empty/full and sealed-mailbox scheduling branches. - Instrumented isolated resource tests improved from 29.065s to 25.660s on the same host, saving 3.405s (11.7%). - The named issue-test bodies improved from 2.67s to 1.29s on the same host, saving 1.38s (51.7%); shared cluster startup is excluded. - The selected DML matrix improved from 17.057s to 14.021s, saving 3.036s (17.8%). - In the additional batch, issue 26121 improved from 0.80s to 0.58s and issue 26232 from 0.59s to 0.13s on the same shared-cluster run, saving 0.68s (48.9%) across those test bodies. - A/B statement coverage for `pkg/frontend` and `pkg/sql/compile` is unchanged at 23.3%. The semantic matrices above are unchanged; issue 26111 intentionally moves incidental coverage from the internal executor to the real frontend authentication/session path. ### Validation - `go test ./pkg/tests/dml -count=1` - `go test -race ./pkg/tests/dml -count=1` - Normal and race runs for all changed issue tests - Normal and race runs for both isolated HashBuild resource tests - Final recovery diagnostics: all 8 shuffle workers reported one spill and no pipeline failure - Final broadcast diagnostics: exact 1 MiB hard-budget rejection and no HashBuild spill - Deliberate FailNow probe for the shared DML fixture cleanup - Post-rebase exact normal run for the three additional issue tests - `gofmt` and `git diff --check` The branch is rebased on `428ce80cb8` (current `origin/main` when pushed).
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
…origin#27613) ## What type of PR is this? - [ ] API-change - [ ] BUG - [x] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [x] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#27571 ## What this PR does / why we need it: This reduces high-cost integration-test setup while preserving the original semantic matrices and strengthening deterministic oracles. No production code is changed. ### Data Branch DML fixtures - Shares database and cluster fixtures across compatible diff, pick, and regression scenarios while keeping isolated tables and fresh-context cleanup. - Replaces oversized inputs with the smallest structural boundaries that retain multiple object blocks, three blocks plus a tail, and two 8192-key pick chunks plus untouched rows. - Keeps conflict policies, key types/coercion, mixed DML, snapshots, transaction rejection, remote multi-CN scope, and unhappy paths. - Replaces log-only/no-error checks with exact chunk layouts, affected-row counts, unchanged-state checks, and exact result sets. - Reduces issue 26568 from 260,000 generated values to two matching rows per side because its renderer contract is driven by explicitly patched optimizer statistics. ### High-cost issues and resource fixtures - Keeps the issue 26095 matrix at 2 account contexts x 3 deletion entry points. Table deletion retains the reported four independent sessions, but removes duplicate system-account rounds. A ready barrier admits every connection before release; catalog rows, branch snapshots, and object deletion are checked exactly. - Builds the issue 26123 source schema once and copies it once per Data Branch/CLONE mode. All 2 modes x 3 LIKE-metacharacter identifiers remain named subtests, including collision tables, exact FK catalog identity, copied rows, and rejected invalid FK writes. - Reduces issue 26131 from 100,000 lineitem rows to two real SUM groups with four rows. EXPLAIN now requires exactly one lineitem producer and exactly two Sink Scan consumers, and the result is exact. - Derives TestLockNeedUpgrade input from the real MaxLockRowCount boundary (10,002 rows in the default cluster instead of 20,000 twice). Both local-owner and remote-proxy paths inspect the live lock service for range-lock coarsening and verify the terminal row count. - Reduces the broadcast hard-budget fixture from 200,000 to 66,048 rows while retaining the grouped-child/broadcast topology, controlled OOM classification, no-spill assertion, no partial result, and post-error health check. - Reduces the eight-worker HashBuild recovery fixture from 1,000,000 to 786,944 rows while retaining the original 28 MiB cap, late map-admission recovery, expression-key shuffle topology, exact result, spill metric, and post-query health check. ### Metadata and account integration fixtures - Reuses one source database for ordinary internal-looking tables and fulltext storage across Data Branch and CLONE. The 2 copy modes, 3 ordinary names, hidden fulltext storage, and copied data remain exact named assertions. - Reuses one branch lineage across the 3 delete-validation identifier cases. Each case still independently proves the exact rejection and unchanged row, while cleanup now removes snapshots on failure. - Batches issue 26232 `information_schema.columns` and `DESC` reads without removing any per-view or per-column default assertion. - Replaces issue 26111's three open-ended internal catalog polling loops with direct target-tenant SQL checks after the cross-account DDL commits. Cyclic rows, both FK catalog entries, both invalid writes, duplicate-create state, and session restoration are still checked exactly through the public user path. ### Coverage and timing evidence - DML A/B coverage across frontend, compile, and plan increased from 26.7% to 27.4%; the frontend data_branch target has no baseline-only blocks, and data_branch_pick.go keeps the exact same covered-block set. - Instrumented HashBuild/HashJoin/Group A/B coverage increased from 45.0% to 45.1%. The late map-admission and recovery blocks are retained; residual block-set differences are limited to concurrent spill-buffer empty/full and sealed-mailbox scheduling branches. - Instrumented isolated resource tests improved from 29.065s to 25.660s on the same host, saving 3.405s (11.7%). - The named issue-test bodies improved from 2.67s to 1.29s on the same host, saving 1.38s (51.7%); shared cluster startup is excluded. - The selected DML matrix improved from 17.057s to 14.021s, saving 3.036s (17.8%). - In the additional batch, issue 26121 improved from 0.80s to 0.58s and issue 26232 from 0.59s to 0.13s on the same shared-cluster run, saving 0.68s (48.9%) across those test bodies. - A/B statement coverage for `pkg/frontend` and `pkg/sql/compile` is unchanged at 23.3%. The semantic matrices above are unchanged; issue 26111 intentionally moves incidental coverage from the internal executor to the real frontend authentication/session path. ### Validation - `go test ./pkg/tests/dml -count=1` - `go test -race ./pkg/tests/dml -count=1` - Normal and race runs for all changed issue tests - Normal and race runs for both isolated HashBuild resource tests - Final recovery diagnostics: all 8 shuffle workers reported one spill and no pipeline failure - Final broadcast diagnostics: exact 1 MiB hard-budget rejection and no HashBuild spill - Deliberate FailNow probe for the shared DML fixture cleanup - Post-rebase exact normal run for the three additional issue tests - `gofmt` and `git diff --check` The branch is rebased on `428ce80cb8` (current `origin/main` when pushed).
VioletQwQ-0
pushed a commit
to VioletQwQ-0/matrixone
that referenced
this pull request
Sep 17, 2026
…origin#27613) ## What type of PR is this? - [ ] API-change - [ ] BUG - [x] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [x] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#27571 ## What this PR does / why we need it: This reduces high-cost integration-test setup while preserving the original semantic matrices and strengthening deterministic oracles. No production code is changed. ### Data Branch DML fixtures - Shares database and cluster fixtures across compatible diff, pick, and regression scenarios while keeping isolated tables and fresh-context cleanup. - Replaces oversized inputs with the smallest structural boundaries that retain multiple object blocks, three blocks plus a tail, and two 8192-key pick chunks plus untouched rows. - Keeps conflict policies, key types/coercion, mixed DML, snapshots, transaction rejection, remote multi-CN scope, and unhappy paths. - Replaces log-only/no-error checks with exact chunk layouts, affected-row counts, unchanged-state checks, and exact result sets. - Reduces issue 26568 from 260,000 generated values to two matching rows per side because its renderer contract is driven by explicitly patched optimizer statistics. ### High-cost issues and resource fixtures - Keeps the issue 26095 matrix at 2 account contexts x 3 deletion entry points. Table deletion retains the reported four independent sessions, but removes duplicate system-account rounds. A ready barrier admits every connection before release; catalog rows, branch snapshots, and object deletion are checked exactly. - Builds the issue 26123 source schema once and copies it once per Data Branch/CLONE mode. All 2 modes x 3 LIKE-metacharacter identifiers remain named subtests, including collision tables, exact FK catalog identity, copied rows, and rejected invalid FK writes. - Reduces issue 26131 from 100,000 lineitem rows to two real SUM groups with four rows. EXPLAIN now requires exactly one lineitem producer and exactly two Sink Scan consumers, and the result is exact. - Derives TestLockNeedUpgrade input from the real MaxLockRowCount boundary (10,002 rows in the default cluster instead of 20,000 twice). Both local-owner and remote-proxy paths inspect the live lock service for range-lock coarsening and verify the terminal row count. - Reduces the broadcast hard-budget fixture from 200,000 to 66,048 rows while retaining the grouped-child/broadcast topology, controlled OOM classification, no-spill assertion, no partial result, and post-error health check. - Reduces the eight-worker HashBuild recovery fixture from 1,000,000 to 786,944 rows while retaining the original 28 MiB cap, late map-admission recovery, expression-key shuffle topology, exact result, spill metric, and post-query health check. ### Metadata and account integration fixtures - Reuses one source database for ordinary internal-looking tables and fulltext storage across Data Branch and CLONE. The 2 copy modes, 3 ordinary names, hidden fulltext storage, and copied data remain exact named assertions. - Reuses one branch lineage across the 3 delete-validation identifier cases. Each case still independently proves the exact rejection and unchanged row, while cleanup now removes snapshots on failure. - Batches issue 26232 `information_schema.columns` and `DESC` reads without removing any per-view or per-column default assertion. - Replaces issue 26111's three open-ended internal catalog polling loops with direct target-tenant SQL checks after the cross-account DDL commits. Cyclic rows, both FK catalog entries, both invalid writes, duplicate-create state, and session restoration are still checked exactly through the public user path. ### Coverage and timing evidence - DML A/B coverage across frontend, compile, and plan increased from 26.7% to 27.4%; the frontend data_branch target has no baseline-only blocks, and data_branch_pick.go keeps the exact same covered-block set. - Instrumented HashBuild/HashJoin/Group A/B coverage increased from 45.0% to 45.1%. The late map-admission and recovery blocks are retained; residual block-set differences are limited to concurrent spill-buffer empty/full and sealed-mailbox scheduling branches. - Instrumented isolated resource tests improved from 29.065s to 25.660s on the same host, saving 3.405s (11.7%). - The named issue-test bodies improved from 2.67s to 1.29s on the same host, saving 1.38s (51.7%); shared cluster startup is excluded. - The selected DML matrix improved from 17.057s to 14.021s, saving 3.036s (17.8%). - In the additional batch, issue 26121 improved from 0.80s to 0.58s and issue 26232 from 0.59s to 0.13s on the same shared-cluster run, saving 0.68s (48.9%) across those test bodies. - A/B statement coverage for `pkg/frontend` and `pkg/sql/compile` is unchanged at 23.3%. The semantic matrices above are unchanged; issue 26111 intentionally moves incidental coverage from the internal executor to the real frontend authentication/session path. ### Validation - `go test ./pkg/tests/dml -count=1` - `go test -race ./pkg/tests/dml -count=1` - Normal and race runs for all changed issue tests - Normal and race runs for both isolated HashBuild resource tests - Final recovery diagnostics: all 8 shuffle workers reported one spill and no pipeline failure - Final broadcast diagnostics: exact 1 MiB hard-budget rejection and no HashBuild spill - Deliberate FailNow probe for the shared DML fixture cleanup - Post-rebase exact normal run for the three additional issue tests - `gofmt` and `git diff --check` The branch is rebased on `428ce80cb8` (current `origin/main` when pushed).
This branch was previously 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:
issue #27571
What this PR does / why we need it:
This reduces high-cost integration-test setup while preserving the original semantic matrices and strengthening deterministic oracles. No production code is changed.
Data Branch DML fixtures
High-cost issues and resource fixtures
Metadata and account integration fixtures
information_schema.columnsandDESCreads without removing any per-view or per-column default assertion.Coverage and timing evidence
pkg/frontendandpkg/sql/compileis unchanged at 23.3%. The semantic matrices above are unchanged; issue 26111 intentionally moves incidental coverage from the internal executor to the real frontend authentication/session path.Validation
go test ./pkg/tests/dml -count=1go test -race ./pkg/tests/dml -count=1gofmtandgit diff --checkThe branch is rebased on
428ce80cb8(currentorigin/mainwhen pushed).