pub const PARALLEL_PUSHDOWN_WAVE_MAX: usize = 8;Expand description
Wave ceiling on chunk fetches dispatched concurrently for one
over-threshold broadcast pushdown (the parallel pushdown transport in
[crate::query::parallel_pushdown]). An over-threshold term list is sliced
into waratah_stats::PUSHDOWN_TERMS_LIMIT-term chunks; at most
this many chunk fetches are outstanding at once, the rest queue and
dispatch as the pool frees. The EFFECTIVE ceiling is the query’s
free-permit count: the arm-permit pool — sized from
QUERY_FETCH_CONCURRENCY in context.rs as the engine fetch
concurrency plus one permit for the query root’s own
whole-execution hold — funds what actually dispatches, so at the
default fetch concurrency (3, a 4-permit pool) this knob rarely
binds, and a pool with nothing free degrades the transport to
degrade_to_chunked_serial: one sequential RPC per remaining chunk,
never a concatenated multi-chunk request and never the unfiltered
whole read the producing verdict rejected.
Used by: every chunked-filtered-fetch consumer — the eager
Broadcast-stamped join’s Filter branch (the one whose allow-list can
exceed the PUSHDOWN_TERMS_LIMIT terms limit at execute
time; join products are not driver-cut, see the star_built field doc in
join_chunks.rs), the leaf over-threshold hook in fetch_whole, and
the parallel-probe road’s per-arm suffix chunks. Note the name: this bounds concurrent fetches of one
query’s allow-list transport — it has nothing to do with storage
sharding.
Changing it affects: concurrent load on the storage partitions’
allow-list walks (visit_allow_list_rows) and the peak memory held in
unjoined chunk results. Two bounds interact: the term-chunk size is the
PUSHDOWN_TERMS_LIMIT terms limit (fixed), this only bounds how many such chunks dispatch
at once. The knob’s own load effect is NOT yet measured — before
tuning this value at the 100m tier,
sweep it together with the arm-permit pool sizing (the same pool funds
every parallel arm evaluation, so raising one competes with the
other), and re-check the q-broadcast-critical parallel-walk regression.
Measured 2026-11-14 (parallel probe road): at defaults this knob NEVER
binds that road — 8 sits above the engine fetch concurrency (the pool’s free
permits after the root hold: QUERY_FETCH_CONCURRENCY = 3 at defaults), so
the pool funds what actually dispatches and the knob only bounds a wave
on a pool much larger than today’s. Widening the probe road’s dispatch
is engine fetch-concurrency policy, not this knob.