Skip to content

test: avoid per-row TN flushes in parallel INTERSECT fixture - #29858

Merged
XuPeng-SH merged 3 commits into
mainfrom
codex/ut-racing-large-blocks-20261011
Oct 11, 2026
Merged

XuPeng-SH merged 3 commits into
mainfrom
codex/ut-racing-large-blocks-20261011

Conversation

@XuPeng-SH

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • Improvement
  • Test and CI

Which issue(s) this PR fixes:

Related to #29562; follow-up to merged #29836. This does not close the overall UT racing runtime goal.

What this PR does / why we need it:

The parallel INTERSECT fixture currently performs a TN flush after each of its 32 single-row INSERTs. Those RPCs are unnecessary for the contract: each table needs exactly 16 physical objects/blocks, followed by real two-CN parallel scans.

Use the existing CN workspace force-flush point only around construction. Each autocommit INSERT writes one object. Keep all physical-layout, remote-plan/mcpu, duplicate/NULL multiplicity, operand-reversal and empty-result assertions. Acquire the point without overwriting another owner, remove it before inspecting/querying the fixture, and preserve the previously enabled fault registry and unrelated points.

One test file changes. No production, CI/workflow configuration, fixture topology, readiness deadlines, or test coverage changes.

Validation

Darwin/arm64, Go 1.27.1, GOMAXPROCS=8, repository CGo test wrapper, short, tags=matrixone_test, count=1:

  • Whole pkg/tests/dml normal (-vet=all) and race: all original 44 root tests and leaf names pass, no skips.
  • Incremental golangci-lint: 0 issues; repository molint, gofmt and diff checks pass.
  • Actual fixture restoration challenged with an initially disabled/enabled registry, unrelated points, conflicting ownership, cancellation and FailNow. Restoration was checked before outer cleanup. Temporary evidence probes/hooks are excluded from this PR.
  • Actual gpt-6.1-sol/xhigh design and final overall review: PASS (exact delivered scope; same session 01a1288f-57a2-7d70-9b24-61c3122b076d)..

Local race measurements

Matched whole-package binary measurements with /usr/bin/time -l, identical base/native inputs/flags and no contending tests/static scans:

Metric Before After
Whole DML wall 120.62 s 104.62 s (−13.27%)
INTERSECT root 18.45 s 1.10 s (−94.04%)
Whole DML CPU 110.58 s 110.00 s
Peak RSS 2,298,560,512 B 1,827,487,744 B
Peak footprint 2,691,207,224 B 2,624,540,536 B

An additional temporal-concurrency candidate was measured and discarded: its small variable incremental benefit did not justify the added executor/session machinery. The delivered change is byte-identical to the measured INTERSECT-only variant.

These are local observations; Linux CI runtime and memory improvements remain to be measured. No claim that the whole CI racing target is complete.

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deep review completed at 8a9ded277130509ba1ba4449b1ad76808c31e8f1, base/merge-base 4022729da24d71b082c22b52aaed3faba2b77ea5. No blocking finding in this one-file change. Submitted as COMMENT because this PR is authored by the reviewing account; this is not a GitHub approval.

The design fits the existing responsibility boundary. The test needs sixteen published objects/blocks per input and actual parallel two-CN reads, not sixteen separate TN flush RPCs. The existing CN-workspace force-flush point produces that layout through normal autocommit/object publication. No production hook, alternate storage/execution path or fixture framework is added. I traced both injection consumers in disttae/txn.go and the unchanged post-construction physical/remote/result oracles.

All previous assertions remain: 16 rows/blocks/objects per table, real peer address and mcpu>=2 for both scans, duplicate and NULL multiplicity, operand reversal and empty result. The injected point is removed before layout inspection and query execution, so it cannot make the asserted execution path pass artificially.

Ownership/unhappy paths: AddFaultPoint(...constant=true) rejects an existing point rather than overwriting its owner. Named removal is deferred only after successful acquisition; registry disable is deferred only if this scope enabled it. LIFO order removes the point before conditional disable. An already-enabled registry and unrelated points remain intact; failed acquisition does not remove another point. FailNow/cancellation still unwind the scope. Existing shared-cluster callback admission serializes scenarios and pkg/tests/dml has no t.Parallel callers. No new wait/loop/deadline or accumulation is introduced.

Evidence was audited and reused rather than rerun: exact-head CI run38104810002 has UT/SCA success and explicitly reports TestIntersectAllParallelMultiplicity PASS2.41s. The recorded author local evidence has all44 root tests and original leaf names in normal and race mode. I compared all254 recorded source/native/config/dependency fingerprints with this head (no differences), and separately checked fault/objectio/disttae consumers against its measured base (no changes). The actual-scope disabled/enabled/conflict/cancel/FailNow probes assert restoration before outer cleanup; injected negative probes intentionally exit failing, and are not misrepresented as ordinary passing tests. Their hooks are absent from the delivered patch.

Accounting: implementation0; tests+31/-17; documentation0. The reported matched local whole-DML race wall change120.62s->104.62s and root18.45s->1.10s supports removing those RPCs. This is local test-cost evidence, not production TP improvement or proof of an overall Linux CI runtime target. No deleted oracle, new heavyweight fixture, weakened timeout or skip was found. No prior substantive comments remain to check. No source changes or subagents were used.

@XuPeng-SH

Copy link
Copy Markdown
Contributor Author

Follow-up lifecycle and shared-fixture optimization is now in #29875. Both predeclared whole-embed race comparisons pass: 346.71→267.20s and 347.59→267.65s (22.97% pooled reduction), with all 116 roots/375 outcomes, four upgrade variants and Close costs retained. Linux CI performance remains pending. The complete gpt-6.1-sol/xhigh final review is submitted on that PR.

This branch was previously deployed

1 inactive deployment
ci — 2175032e Deployed Oct 11, 2026 by XuPeng-SH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement kind/test-ci size/S Denotes a PR that changes [10,99] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants