Repository navigation
test: avoid per-row TN flushes in parallel INTERSECT fixture - #29858
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
left a comment
There was a problem hiding this comment.
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.
|
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. |
What type of PR is this?
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:
pkg/tests/dmlnormal (-vet=all) and race: all original 44 root tests and leaf names pass, no skips.Local race measurements
Matched whole-package binary measurements with
/usr/bin/time -l, identical base/native inputs/flags and no contending tests/static scans: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.