Repository navigation
Conversation
A scan can now be split into independent pieces, or opened into a pool that host threads share by each polling a worker. Both have defaults on top of partitions, so every existing source supports them; sources and hosts move over in later changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
Layout scans now split on their layout splits and open into a pool whose workers share those splits through a channel. Multi-file scans queue an open for each deferred file; the worker that opens one sends the file's splits back into the channel for any worker to take. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
Decoding a split inline kept each worker's splits on its own thread. Spawning them onto the session's runtime, as V1 scans do, lets idle runtime threads decode them and starts their I/O at once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
Each DataSourceExec execution now opens its Vortex scan into a pool whose workers back the output partitions, or splits it into one piece per partition when order matters or work stealing is disabled, replacing the partition stream shared under a mutex. A fetch now bounds each of several output partitions rather than forcing one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
The layout file in the split-mode test had a single layout split, so splitting it returned one piece. The test scan now splits natively. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
Adds ArrowArrayStreamExt::to_arrow, which converts each array of a stream to a RecordBatch as a CPU task on the session's runtime with bounded, order-preserving concurrency. The v2 DataFusion source now calls it on each worker instead of spawning conversions itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
Benchmarking VortexTable needed both --scan-v1 true and VORTEX_USE_SCAN_API=1, so it could not be compared with the listing table's V2 scan in one run. --scan-api true registers Vortex tables through the Scan API whatever --scan-v1 says; the environment variable keeps working. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
Settle the ScanPool trait before hosts build on it: progress() and is_exhausted() let a host draw a progress bar and stop starting workers on a drained pool. Both have safe defaults. DataSourceScan gains plan-time row_count/byte_size estimates, and PartitionPool becomes public so a scan that cannot split can still open over its partitions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
The v2 DataFusion source keeps develop's execution, output partitions sharing the scan's partition stream with its single-partition fetch, selectable at runtime so one binary can compare it with split and open. VORTEX_SCAN_POOL defaults to split and open; the partition stream goes away with the partition API. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
Layout scans now split on their layout splits and open into a pool whose workers share those splits through a channel. Multi-file scans queue an open for each deferred file; the worker that opens one sends the file's splits back into the channel for any worker to take. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
Decoding a split inline kept each worker's splits on its own thread. Spawning them onto the session's runtime, as V1 scans do, lets idle runtime threads decode them and starts their I/O at once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
Pool splits are spawned onto the session runtime, so the test session needs a runtime that runs them while test workers block on their streams. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
A benchmark of the pool should measure the pool, not a different way of running splits. Pools now build a file's split tasks all at once when a worker first takes one, so the file's reads register together and coalesce, as execute_stream builds a partition's tasks up front. Scans with a filter and a limit build each split lazily on a CPU task and optimize the trimmed output on a second one, through the same helpers execute_stream now uses. A worker keeps as many splits in flight as one partition stream does by default (four per core, capped by split_concurrency), so a host with a worker per core matches the partitions path's in-flight total. Deferred files open on the session runtime, at most the source's open concurrency at once, in both pool kinds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
An open slot now passes to the next deferred file whether the open finished or its worker gave it up, so a dropped worker strands only the file it was opening. A spent limit counts the unopened files as read, so progress ends at 1.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
Takes the base's version of every file outside vortex-datafusion, vortex-arrow and the datafusion-bench flag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
When pool workers share one file's splits, many threads request segments from one SharedSegmentSource. Each request took an exclusive shard lock and held it across the inner request. Requests now look up an in-flight request under a read lock, make the inner request outside any lock, and lock exclusively only to record it, with the shard count scaled to the cores. A requester that loses a race for the same segment drops its own request, which reads the same bytes, so coalescing is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com>
A worker is one host thread's share of a pool's output, while the pool's work runs as tasks on the session's runtime. A host whose runtime has no threads of its own must drive it while waiting on a worker. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
Workers of an unordered pool each kept their own window of splits, so with fewer splits than workers × window the first workers took most of a scan and the rest idled. The pool now runs its splits in lanes on the session runtime, splits_in_flight of them across the whole pool, and every worker takes rows from one bounded output channel. A worker is just one host thread's share of the output, so the number of workers is only the host's parallelism. Trimming to a filtered limit happens once, in the lanes, and dropping a worker gives up nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
A lane is already a task on the session's runtime, so spawning each split and each deferred-file open as a second task and awaiting it only added a spawn and a cross-thread wake per unit. The ordered pool, whose units are polled by its worker on the host thread, still spawns them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
A pool checks a file's statistics against the filter when the file starts, which for an opened scan is when the pool opens. A filter with dynamic parts, such as a join's, may reject the file by the time its splits run, and execute_stream checks when it starts reading. Check again, once per file, when the first split is taken. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
A pool started splits_in_flight lanes, four per core, when its first worker started, and woke every one of them to end, however few units the scan had. A TPC-H query scans several small single-file tables, so it paid that spawn and teardown once per table. Lanes now start one for each unit that no waiting lane will take, when the first worker starts and whenever a lane takes a unit with more queued behind it, up to splits_in_flight. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
An unordered pool queued each opened file's splits one after another, so its lanes read about one file at a time. A wide scan then waited on that file's read latency, and every split of the file was started before the first rows could tighten a dynamic filter. Each opened file is now one turn in the channel: a lane takes the file's next split and queues the turn again behind the other files', so the lanes read the open files' splits in turn. On ClickBench q23 through DataFusion this cut wall time from 169 to 114 ms (develop: 139 ms) and scan output rows from 886 to 400 (develop: 2,425); q22 returned to parity. Lanes now grow with the splits and opens pending rather than the units in the channel, since a file is a single unit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…b-v2 Signed-off-by: Nicholas Gates <nick@nickgates.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…source Signed-off-by: Nicholas Gates <nick@nickgates.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…b-v2 Signed-off-by: Nicholas Gates <nick@nickgates.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A host joins a scan on ScanExec::is_exhausted, a flag set once and never cleared, and creates each thread's stream with ScanExec::stream. The handle is Sync, so hosts share it without a lock. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # vortex-layout/src/scan/layout.rs # vortex-layout/src/scan/multi.rs # vortex-scan/src/lib.rs
Signed-off-by: Nicholas Gates <nick@nickgates.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # vortex-datafusion/src/v2/source.rs
Signed-off-by: Nicholas Gates <nick@nickgates.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # vortex-layout/src/scan/layout.rs # vortex-layout/src/scan/split_queue.rs # vortex-scan/src/stream.rs
Signed-off-by: Nicholas Gates <nick@nickgates.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Nicholas Gates <nick@nickgates.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The queue marks the scan exhausted when its last part is taken or its limit is spent, and an ordered scan once its first stream exists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
…source Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
…b-v2 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
…source Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
…b-v2 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Nicholas Gates <nick@nickgates.com>
Polar Signals Profiling ResultsLatest Run
Powered by Polar Signals Cloud |
Benchmarks: TPC-H SF=1 on NVME 📖Commits: PR How to read Verdict and Engines
Hot runs: geomean 1.000x ➖ · 22 queries × 7 targets (0↑ 2↓)Each cell is develop
Cold runs (first iteration): geomean 1.008x ➖ · 22 queries × 7 targets (1↑ 2↓)
No file size changes detected. |
Benchmarks: Clickbench on NVME 📖Commits: PR How to read Verdict and Engines
Hot runs: geomean 1.004x ➖ · 43 queries × 7 targets (6↑ 5↓)Each cell is develop
Cold runs (first iteration): geomean 1.018x ➖ · 43 queries × 7 targets (5↑ 20↓)
No file size changes detected. |
|
Benchmark-only run is done; closing. |
Exists only for the bench-scan run of the Scan API stack (#11717) with the block_on fast path (#11896) merged in; do not merge.
🤖 Generated with Claude Code