Repository navigation
test: retire dead async worker and remove clock waits - #29679
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 conclusion: not approvable yet
Reviewed 21db6ad against PR base f20f5ca147c44b012343d0f48dfcd84b6a5986a1, and cross-checked freshly verified main dce60631f8c857ae730a4d2f328df5962e4f2a8d. No subagents. This is a COMMENT review because the authenticated reviewer is also the PR author; GitHub does not allow self-REQUEST_CHANGES.
The cleanup/reuse direction is reasonable. I read the complete 27-file delta and traced the changed ownership boundaries. I found one P2 test-oracle defect (inline below), not a demonstrated new production correctness defect. There is also an integration blocker with latest main.
Integration blocker: preserve #29674 when resolving the conflict
The PR currently reports CONFLICTING / DIRTY. Main has already merged #29674, which changes the same MORPC GC tests. Its useful independent checks include zero factory calls for an unregistered client, unconditional idle-backend removal/Close assertions, and manager/client cleanup registered before fatal assertions. This branch overlaps those edits but does not contain those stronger checks. Rebase/integrate the canonical main version rather than selecting this older fixture wholesale during conflict resolution; then revalidate the integrated changes. This is overlap in test responsibility, not a second production GC implementation.
Design, deletions, and QA
- Implementation files: +54/-1517. The unused Go AsyncWorkerPool and private merge simulator have no product consumers. Existing ThreadPoolExecutor and C++ cuVS worker ownership remain intact. The real scheduler Clock is relocated without changed semantics; the private resource-controller fixture stays test-only. No new production state machine/storage/execution path.
- Tests/test support: +434/-3428. Commented/permanently skipped diagnostics and orphan private fixtures are distinct from active coverage. Retained GCCatalog1/GCCatalog3 and checkpoint/replay tests provide actual drop/GC/replay assertions. The two new replacement tests exercise different conflict mechanisms (destination-key collision and competing predecessor); TestDelete4 checks committed updates across restart. Exporter content checks are stronger than the old timing-dependent early return. The collector rewrite needs the inline correction.
- Repository documentation: no changed files. Refresh the PR description: it still claims TestUpdate was removed, a 100ms unregistered-client wait was retained, and 26 changed files; these do not match the final head.
| Unhappy-path lens | Reviewed ownership / outcome |
|---|---|
| Q1 cleanup | Client creation/cleanup retain existing owners; ticker cancellation joins the existing done channel; TAE temporary batches/transactions have close/rollback paths. Preserve #29674's failure-path fixture cleanup during integration. |
| Q2 termination | Exact create-state completion and actual job execution replace timing guesses. Collector SQL/Stop waits need bounded failure diagnostics with the corrected live oracle. |
| Q3 growth | Existing fixed workers, bounded channels, and fixture ownership are retained; no new unbounded production queue or cache is introduced. |
Validation evidence
- Exact-head UT/race job, SCA, pessimistic BVT and proxy BVT passed. Skipped jobs are not counted as validation.
- Supported native prerequisites rebuilt successfully;
git diff --checkpassed. User worktree changes were untouched; all mutations were external review-only overlays. - Normal collector/exporter/StartStop tests passed. Five changed MORPC scenarios each passed
-race -count=3(15 named case executions). - TestDelete4 and the two new replacement tests each passed
-count=3atGOMAXPROCS=1(9 named case executions); exact-head CI also ran these with race enabled. - Non-voting replica test passed 3/3; deliberately ignoring StartNonVotingReplica failed its separate metadata-file oracle. That concern was rejected.
- Collector counterfactual failure/pass evidence is detailed inline. This is a test-quality regression, not evidence that the unchanged production collector is currently broken.
CI's TestDelete4 took 8.77s; no business-workload or total-CI speedup is established by these checks. At the reviewed head there were zero human review threads and zero prior submitted reviews, so there is no outstanding historical human finding to claim was resolved.
Required before approval: restore the collector's independent live-publication oracle, integrate latest main without losing #29674's checks, and validate the resulting head.
XuPeng-SH
left a comment
There was a problem hiding this comment.
Final repair review: PASS for the complete delivery diff against main dce6063 (delivery SHA256 958b0b7408d5bb09d859bde83e29b22b0b32d2c5aa1f15198ebf4e5bb6b4e028).
The P2 collector oracle gap is fixed: live three-row m1 SQL is asserted before Stop, and pending two-row m2 drainage is asserted after a bounded graceful join. Cleanup is registered immediately and retains the original stop handle. Independently disabling live threshold publication or shutdown drainage now fails at the corresponding assertion with cleanup completed. Rebase retains main's #29674 GC tests byte-for-byte and reuses its backend publication helper.
Local complete-scope normal and race UT both terminated with exit 0: 15 tested packages passed, plus the no-test testutil support package compiled; 3,372 test/subtest pass events and five existing skips per mode. Collector and auto-create also passed 100 race repetitions each. Formatting, diff check, go vet, repository-pinned molint and configured incremental golangci-lint 2.14.0 passed.
Design and final overall model gates both used gpt-6.1-sol / xhigh; final review session 01a11a2d-1f3d-7051-a42d-e1abed72b8a7 found no confirmed material blocker across the complete 26-file scope. Validation is Darwin arm64 CPU with -short; skipped tests, new BVT and whole-suite speedup are not claimed. The pre-existing rawhist accounting issue is outside this test-oracle repair; m2 proves drainage, not rawhist threshold semantics.
This is a submitted COMMENT review because GitHub does not permit approving one's own PR. Remote CI has not been awaited.
XuPeng-SH
left a comment
There was a problem hiding this comment.
Deep re-review: approvable; no confirmed blocking finding
Reviewed head aa3fa678d293fb704dfaea6ca51b634a04176133 against freshly verified main/merge-base dce60631f8c857ae730a4d2f328df5962e4f2a8d. No subagents and no source changes. This is a COMMENT review because the authenticated user is the PR author; it is not a GitHub APPROVE.
The design is proportionate: remove disconnected implementations and inactive scaffolding, retain the active owners, and use the existing completion/publication paths. No duplicate production state machine, storage or execution path is introduced. The full 26-file change map was reconciled with the previous review; source identity and relevant dependencies are unchanged. Implementation is +54/-1517, tests/support +429/-3397, repository documentation unchanged. The clock relocation preserves behavior and its production consumers; the retained tests distinguish the two transaction-conflict mechanisms and committed state across restart.
Historical comments
All actionable findings are closed by source and evidence, not merely by thread state:
- Live collector threshold publication is asserted before Stop, with bounded receives and immediate cleanup; pending-buffer drainage has a separate post-Stop oracle.
- Main #29674's canonical GC test file is byte-identical to main. Auto-create reuses the existing backend publication helper.
- The merge conflict and stale PR-description claims are resolved. The sole actionable review thread is resolved; no other outstanding human finding was present.
Additional QA challenge
I disabled only the SQL collector's timer by replacing its NewConstantClock(c.opts.flushInterval) with NewConstantClock(0) in an external Go overlay. The retained TestMetric stopped at metric_test.go:83, waiting for the first INSERT, and the 45-second guard terminated the run with exit 1. The healthy same-head control passes in normal mode (16.07s) and race mode (16.40s). Thus low-volume periodic publication still has real integration coverage through InitMetric/exporter/SQL collector; the suspected coverage-loss finding is rejected. This older integration test uses a coarse package timeout for failure diagnostics.
Together with the existing independent threshold-disabled and drain-disabled controls, the tests distinguish live threshold flush, graceful drainage and periodic low-volume publication.
| Unhappy-path check | Verified closure |
|---|---|
| Ownership | Immediate collector cleanup retains the first Stop handle; existing GC cleanup and TAE rollback/batch/iterator ownership remain intact. |
| Termination | Collector receives/joins are bounded; the finite fixture cannot fill its worker queues; backend publication and ticker completion use their actual owners. |
| Growth | Existing bounded channels/pools and finite fixtures; no new production queue/cache/worker owner. |
Validation and cost
Reused exact-source normal and race results: 15 tested packages passed plus testutil compiled, with 3,372 test/subtest pass events and five existing skips per mode. Incremental formatting, vet, pinned molint and configured golangci-lint passed. Collector and auto-create each retain 100 successful race repetitions.
New focused race checks completed with exit 0: exporter Start/Stop, concurrent job Schedule/Stop, both modified GC-ticker tests, and non-voting replica startup each passed 100/100; TestDelete4 passed 22/22. Counts were derived from the existing race-body durations with a 30-second budget per test.
Recovered TestDelete4 costs about 1.29s normal / 1.34s race locally; the two deterministic conflict tests each cost below 0.1s. No whole-CI or production-workload speedup is established. No SQL/wire/persistent-format change requires additional compatibility or BVT proof here. Darwin arm64 CPU/-short and existing skips remain explicit limits. The unchanged rawhist accounting defect remains outside this test-cleanup scope.
Remote CI is still running and has not been counted as passed. Code review has no remaining blocker; merge still requires the repository's CI gates.
What type of PR is this?
Which issue(s) this PR fixes:
Refs #29249 (ongoing test-quality work; this PR does not close the tracking issue).
What this PR does / why we need it:
Remove disconnected implementation and test scaffolding, and replace clock waits with observable behavior without weakening the retained oracles.
Final delta against main: 26 files, +483/-4914 lines. No SQL, protocol or persistent-data-format changes. Existing data compatibility is unchanged; mixed-version operation is not part of this change.
Validation
-short -tags matrixone_test -count=1with the repository CGo wrapper; the testutil support package is compiled but contains no tests. The skipped tests are not claimed as validated.go vet, the repository-pinnedmolint, and configured golangci-lint 2.14.0 against the final main base.gpt-6.1-solwithxhighreasoning. Local terminal evidence is recorded independently of remote CI.Removing fixed waits reduces avoidable test delay, but this PR does not claim a measured whole-suite or production performance improvement. Remote CI is not used as a substitute for the local gates.