Repository navigation
[Bug] Fix multi-member recursive CTE frontier handling - #32828
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? |
|
This pull request is merged. |
|
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: 74545ab8a1e547bc251d1d1ea95028b89cb7c684
Assessment: approve
No actionable defects found. Termination correctly belongs to the shared recursive sink, and existing broadcast execution preserves frontier ordering without adding another mechanism.
Model: gpt-6.1-sol / max
Session: 01a1a004-9884-72c0-ad39-f096c4209c4a · slot 1 · generation 0
Validation:
-
Six focused regressions and five owning/consumer packages passed normally.
-
Full dispatch and planner race suites passed; dispatch regressions passed 100 repetitions each, and cancellation/prepared reuse passed two repetitions.
-
Native SQL probe passed all 11 maintained statements on both CN coordinators, asserting six exact result sets each. The base-dispatch negative control failed as expected.
-
Frozen source, discussion coverage, native provenance, commands, receipts and retained logs were verified in validation-ledger.json.
Limitations:
-
Recursive joins accept higher broadcast build memory usage and lack shuffle-only spill/retry; no performance improvement was claimed or benchmarked.
-
The initial planner race run exceeded its 240-second budget; the unchanged package passed with a 600-second bound.
What type of PR is this?
Which issue(s) this PR fixes
Fixes #32799
Fixes #32612
What this PR does / why we need it
Recursive members must forward their round markers even when their local frontier is empty. Only the shared recursive sink can decide that the global post-DISTINCT frontier is empty and terminate the CTE. This prevents a member from stopping early while MergeCTE still waits for its marker, fixing both the cross-generation hang and the missing later-member row.
Recursive joins containing a recursive scan bypass shuffle exchange: it can forward a round marker before buffered bucket tails, breaking feedback-round ordering. Other joins retain the existing shuffle planning.
Validation:
Resource tradeoff: recursive-scan joins use the existing broadcast build path, which may consume more build-side memory and does not use shuffle-only spill/retry for very large joins. This change makes no performance-improvement claim.