Add dependency-ordered staged dispatch - #19472
Draft
wirybeaver wants to merge 2 commits into
Draft
Conversation
Introduce an opt-in file-backed HASH exchange that preserves the existing worker assignment. Producers materialize consumer-independent logical partitions, report exact output handles, and consumers fetch their static partition from every producer. The implementation includes atomic publication, cancellation-safe cleanup, bounded gRPC streaming with backpressure, output coverage validation, and planner/runtime/storage tests. Test Plan: - PinotDispatchPlannerTest, PlanNodeSerDeTest: 140 passed - materialized mailbox/runtime/dispatcher tests: 109 passed - spotless, checkstyle, and license checks passed for pinot-common, pinot-spi, pinot-query-planner, and pinot-query-runtime
Add an opt-in broker-owned dispatch graph that treats materialized exchanges as completion barriers while contracting streaming-connected stages into atomic dispatch groups. The broker dispatches only ready groups, waits for exact unique worker completion and stream closure, preserves assignments, and orders the local root stage under one absolute deadline. Test Plan: - StageDispatchGraphTest, StreamingQuerySessionTest, StreamingDispatchObserverTest, QueryDispatcherTest: 110 passed - spotless, checkstyle, and license checks passed for pinot-common, pinot-spi, and pinot-query-runtime
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #19472 +/- ##
============================================
+ Coverage 67.69% 67.74% +0.05%
Complexity 1430 1430
============================================
Files 3488 3495 +7
Lines 224306 225327 +1021
Branches 35416 35582 +166
============================================
+ Hits 151850 152658 +808
- Misses 60447 60575 +128
- Partials 12009 12094 +85
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Sep 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR flow
Staged dispatch with materialized exchange: plan marked exchange, build dependency graph, dispatch groups when ready, serve via file-backed mailbox, broker validates outputs.
AI-generated · Green: added · Yellow: modified · Red: removed · Gray: existing
Partial evidence: 3 file patches omitted; 0 truncated.
Diff evidence
Summary
Adds Phase 2 of the AQE prerequisite stack: opt-in staged dispatch with unchanged worker assignments.
Depends on #19471.
Design
The broker builds a deterministic dispatch-group DAG. Materialized edges form completion barriers; streaming-connected stages are dispatched together. A group transitions only after every expected
(stageId, workerId)reports success and every stream closes. Duplicate or unexpected reports cannot release the barrier.Invariants
stagedDispatch=trueTest Plan
pinot-common,pinot-spi, andpinot-query-runtime