Repository navigation
feat(scan): let a scan request bound the splits it decodes at once - #11127
robert3005 merged 7 commits into
Conversation
ScanRequest gains split_concurrency: the most splits of each partition decoded at once, in all. Both layout data sources pass it to ScanBuilder::with_some_max_splits_in_flight, a cap kept apart from the per-worker concurrency. JNI takes it as ScanOptions.splitConcurrency and drives capped Arrow streams directly, so Arrow conversion ahead of Java is bounded by it too. Spark takes it as the vortex.splitConcurrency read option. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Christopher Wirt <[email protected]>
Preserve broadcast Hadoop configuration and carry split concurrency through both VortexIo construction paths. Signed-off-by: Christopher Wirt <[email protected]>
|
I think now you're conflicting with #11198 |
Merging this PR will not alter performance2 warnings
Comparing Footnotes
|
Resolve the vortex-jni scan.rs conflict with vortex-data#11198: feed the split-concurrency lookahead into block_on_stream_prefetch, and drop scan_iterator, whose only job was to avoid the per-core queue that the prefetch bridge already removes. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Christopher Wirt <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Christopher Wirt <[email protected]>
|
Merged |
Summary
A scan decodes
4 × available_parallelism()splits at once. In Spark, every task in an executor runs its own scan sized to the whole machine, and each split holds the decoded chunks of every column it overlaps. On wide, nested files that is GiBs of native memory per executor (#11123).This adds a per-scan limit on how many splits are decoded at once.
ScanRequest::split_concurrency→ScanBuilder::with_some_max_splits_in_flightScanOptions.splitConcurrency()vortex.splitConcurrencyread optionResult: a full scan of a 180 MB list-layout file, peak live native bytes:
Changes
vortex-scan/vortex-layout:ScanRequest::split_concurrency, honoured by both layout data sources.with_concurrency. A laterwith_concurrencycall (as the DataFusion opener makes) leaves it in place, andconcurrency()keeps its meaning.ScanOptions.splitConcurrency().vortex.splitConcurrencyread option, for V1 and V2 reads, documented indocs/user-guide/spark.md.Tests
with_concurrencykeeps the cap. Concurrency scaling saturates instead of overflowing.ScanOptionsvalidation, and a capped scan reads every row. Paused-consumer regressions with two background workers.On the fork (quantcast#64, same change), the Rust tests for
vortex-layout,vortex-scan,vortex-jniandvortex-filepassed, along with the JNI, Spark 3.5 and Spark 4.0 suites.This branch ports that change onto
develop. The fork's Spark V1/V2 read test lived in a test class thatdevelopdoesn't have, so it moved intoVortexV1FallbackTest. Onlygit diff --checkhas been run on the port.API Changes
ScanRequest::split_concurrency. Code that buildsScanRequestwith..Default::default()is unaffected.ScanOptions.splitConcurrency()builder option in JNI, and a newvortex.splitConcurrencySpark read option. Unset keeps today's behaviour.AI assistance
Disclosed per the AI policy: AI tools helped write and review this change. Claude Code prepared this upstream port, issue and PR description at my request. I am the responsible contributor.
🤖 Generated with Claude Code