Repository navigation
Fix worker capture vector cleanup in parallel DedupJoin - #33127
Conversation
Release old-column captures using the pool recorded on each vector, not the receiving process pool. Cover both successful consumption and mailbox draining after a worker failure with an accounted worker pool. Fixes matrixorigin#33123
Keep the recorded capture pool until publication succeeds. Use it to validate local and transferred vectors on release, including mailbox drains. Exercise real worker publication and reject mismatched owner pools.
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? |
|
Queue requested — the merge queue status continues in this comment ↓. |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 0b88faf7e265673ac1c84f68f57c96f9f8f1a75f
Assessment: approve
Parallel DedupJoin now carries the allocating worker's pool with its captured vectors. Successful publication transfers cleanup to the mailbox consumer, and rejected publication leaves it with the worker. Normal consumption, abort drain and local cleanup share the same release routine and preserve Vector.Free's pool check.
Model: gpt-6.2-sol / xhigh
Session: 01a1f0a0-5126-78f3-9ab8-ef4e87f2f119 · slot 0 · generation 3
Validation:
-
Isolated runtime preflight, frozen patch verification and native builds passed with Go 1.27.1 and the repository's pinned dependencies. The initial host toolchain and missing jemalloc diagnostics were resolved. See review-validation.md.
-
The full dedupjoin package passed in normal and race modes. Four exact lifecycle tests passed 100 race repetitions each, covering successful transfer, abort drain, failed publication, stop/send ownership and mailbox reset. The wrong-pool test passed in both package runs.
-
Frozen CI reports successful Ubuntu unit tests, Linux arm64 static analysis and multi-CN pessimistic and proxy BVT for this head.
Limitations:
- The exact million-row TKE nightly scenario from issue #33123 was outside local validation. The review confirms the concrete capture-cleanup failure path and its correction.
🚫 Left the queue · pull request branch update failed44 min in the queue, with no time running CI. So far
Reason The pull request can't be updated
To get back in the queue
Requeue requested — the merge queue status continues in this comment ↓. Times in UTC · dashboard · how the merge queue works |
✅ Merged into
|
Resolve conflicts with matrixorigin#33115 (vector test consolidation) and matrixorigin#33127/matrixorigin#33133 (dedupjoin captured-vector owner pool): carry the read-only-NULL fixture to minmax_test.go, keep the pool-owned bitmap tests in mpool_test.go, and free both the captured vectors (with their owner pool) and the worker's matched/captured bitmaps in freeWorkerJoinMsg. Port upstream's new tests to the pool-taking bitmap API. Co-Authored-By: Claude Opus 5.5 <[email protected]>
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #33123
What this PR does / why we need it:
A parallel
DedupJoinworker transfers captured old-column vectors to the merger, but the vectors still belong to the worker's allocation pool. Freeing them with the merger's process pool caused a panic during finalize and another while draining queued messages. Downstream operators then waited for an end signal until the SQL client timed out.The worker records the allocation pool when it creates the capture vectors. It transfers that pool with the vectors in
WorkerJoinMsgonly on successful publication; on a rejected send the worker still owns the captures. Local cleanup, normal merger consumption, and mailbox draining all pass the recorded worker pool toVector.Free, preserving its independent ownership check. No query timeout changes.The regression test runs real worker finalization against merger consumption and the error-drain path. A separate negative test verifies that an incorrectly declared pool is rejected. Removing just the pool handoff from this revision reproduced the mismatch in the success-path test. The
dedupjoinpackage passed normal and race tests, vet, and lint. The original revision was also checked locally with 50 self-referencing replacements on a one-million-row composite-key table. The TKE nightly workload was not rerun.