Repository navigation
fix(shuffle): support covering-index expression keys on 4.1.6 hotfix - #30977
Conversation
XuPeng-SH
left a comment
There was a problem hiding this comment.
The implementation direction is sound for expression-based Range routing, and the new tests cover concrete row-to-bucket assignments, NULLs, constants, and the real serial_extract case. I am requesting one test correction before approval: the scale-down test claims to wait for catalog routes from both retiring CNs, but require.NotEmpty(cachedCatalogBinds) only guarantees one remote owner was captured. Both subsequent readiness loops iterate only that snapshot, so the test can pass without ever checking a route owned by the second retiring CN. Assert that the captured set contains bindings for both non-survivor service IDs, or explicitly warm/capture one route per retiring CN before scale-down.
I reviewed the exact head and changed paths statically; I did not run MatrixOne in this workspace. The focused UT/BVT results and 43/43 changed-block coverage in the PR description are author-reported, not my execution. This PR is still draft and its CI should be evaluated after the coverage assertion is added.
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? |
4ffb40c to
45cfcd3
Compare
XuPeng-SH
left a comment
There was a problem hiding this comment.
Reviewed head 45cfcd3 against 4.1.6-hotfix@d315e9c99302a9e9accff67e9237145b1f93f447. No new blocking findings in this delta. Expression evaluation feeds the existing Range router and pool; empty remote completion reuses the bounded attachment wait, with terminal notification still owned by Reset.
Correction to my previous review: idle_lock_route_scale_down_test.go is absent from both the reviewed a39a6c1 tree and the current tree. That scale-down assertion request was out of scope and should not block this PR. There are no inline review threads to resolve.
Verified exact-head CI artifacts: shuffle/shuffleV2/dispatch/connector/compile/process packages pass under race; the single-/three-CN SQL regression passes; SCA reports 0 issues; the new BVT passes 27/27. Locally rebuilt matching native libraries and passed the new V2 Range/constant tests. The known overall CI failures are excluded as requested; this is not a full-CI-green claim. No comparative performance benchmark was run.
Non-blocking, pre-existing correctness follow-up: V1 shuffle.go:723 still casts nullable uint64 keys to int64. With four buckets, min/max 0..1000000 and input [2^63, NULL], the real V1 column router puts both rows in bucket 0; its expression router puts the high key in bucket 3. An isolated local parity probe fails identically on clean base and head. This unchanged V1 defect predates the PR; the V2 correction is valid. A separate narrow fix should use the unsigned helper and retain column/expression parity coverage. This is an operator-level reproduction, not an end-to-end SQL reproduction.
Reviewed net growth separately: production Go +27, Go tests +681, SQL/result BVT +254, Compose +1, documentation +0. The tests check routing ownership and real planner/topology behavior, beyond absence of panic.
XuPeng-SH
left a comment
There was a problem hiding this comment.
发现一处空输入远程 dispatch 的可用性回归,需修复后合并。当前结论基于新旧版本及通知协议的源码追踪,尚未运行端到端故障注入复现。
|
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: db92451d909a518a7aec09d9c21c2851f2ce9d60
Assessment: approve
Reviewed the complete 17-file delta and affected callers. Expression routing reuses the existing range router and pool. Atomic receiver publication closes the attachment race while preserving Reset-owned completion and successful late notification. Rollback and cancellation ownership are coherent; added work is bounded by batch size or receiver count. No actionable findings remain.
Model: gpt-6-astra / xhigh
Session: 01a13dcf-1586-7a01-9000-d45e20995cf8 · slot 1 · generation 1
Validation:
-
Matching native prerequisites rebuilt; isolation preflight passed. Commands, source fingerprints, exit receipts and logs reconciled in /home/xupeng/.local/state/mo-bot/jobs/1c8e41fc35e1cc820dccc62c/attempt-1/validation-audit.json. Source remains unchanged.
-
Focused routing, constructor and handler tests passed. Six lifecycle tests each passed 100 race iterations, covering delayed notification, cancellation, disconnect, timeout, rollback and generation reuse.
-
Full normal colexec, dispatch, shuffle and shuffleV2 suites passed. All five owner packages passed under race with only three independently base-reproduced Parquet tests excluded.
-
Public MySQL regression passed under race for four query shapes with single- and multi-CN plans on a three-CN cluster; expected counts and topology assertions passed.
-
Changed-package vet, configured incremental golangci-lint, formatting, whitespace and Docker Compose configuration checks passed.
Limitations:
-
The unfiltered compile suite fails three Parquet fanout tests identically on the verified frozen base; provenance and failures are retained in base-source-audit.json and base-parquet.log.
-
No comparative performance benchmark, multi-host deployment, Docker image startup, full-repository CI or mo-tester comparator run was performed.
-
Linked issue bodies and traceable author/CI execution artifacts were not supplied; this assessment relies on frozen source/comments and independently recorded local checks.
What type of PR is this?
Which issue(s) this PR fixes:
Related to matrixorigin/matrixflow#19631 and #25687.
What this PR does / why we need it:
Covering-index rewriting can replace a selected shuffle column with
serial_extract(...)after Range Shuffle has been chosen. On4.1.6-hotfix, aggregation constructors dereference a missing column reference and ShuffleV2 rejects Range expressions. Preserve the selected expression and its output type in JOIN/GROUP V1/V2 construction, then route evaluated vectors through the existing Range implementation without replacing input vectors or changing pool ownership.Use unsigned arithmetic in the shared nullable uint64 min/max router so high-bit keys retain the same bucket with or without NULLs. Column/expression/serial_extract tests check high-bit and maximum uint64 values, NULL placement, clamping, exact row ownership, vector identity and cleanup.
For empty remote dispatch, atomically claim a UUID and enqueue its receiver under the registration lock. Reset closes registration, drains queued receivers and owns terminal delivery. A healthy notification first handled after 30 seconds still consumes the existing completion tombstone and receives normal End; empty EOS no longer waits for it. Capture the original cancellation function before publication, clean up partially registered dispatches before failed startup returns, and retain the existing nonempty-data and missing-producer bounds. No wire-format change or additional worker/retry is introduced.
The Compose MinIO fixture explicitly selects amd64, propagates bucket-setup errors and tolerates an existing bucket. The latest target
4.1.6-hotfix@9cdcce555ais merged, retaining its disconnect/export fixes, independent V1 uint64 correction (#31115) and exclusive relation-handle backport (#31116), without duplicating those changes in this PR. No planner strategy or pool implementation is replaced.Validation
Current review-fix validation uses Go 1.26.4 on macOS/arm64 with matching native libraries:
TestCoveringIndexShuffleSQLpasses all four query shapes on one and three CNs under-race -short -tags=matrixone_test, including after target integration. The prepared UPDATE JOIN second-execute race regression also passes on that integrated target. Counts remain 270002 / 134102 / 134100.Earlier Linux/amd64 evidence at
45cfcd3f21remains applicable to the unchanged expression/routing contracts. Its three full-compile Parquet fanout failures were reproduced on clean targetd315e9c993in that environment; no Parquet assertion was changed. The focused/macOS results above do not establish full-repository Linux CI success.