Repository navigation
Conversation
The parquet stream asks for a row group's column chunks only after it has finished decoding the previous one, so a base-file read never overlaps a fetch with decoding. PrefetchingReader wraps the AsyncFileReader under the stream. It maps each request to the row group and leaf columns it falls in, and starts fetching the full chunks of those columns for the next selected row group in a spawned task. Under a row filter it learns only the filter stage's columns, since the stream fetches the rest only for groups where a row survives. A request is served from a prefetched chunk only when the chunk holds the whole range, and a failed prefetch falls back to a normal fetch. It stays at most one row group ahead and aborts any task in flight when dropped. On a current-thread runtime the prefetch runs only while the consumer yields, so the overlap there is limited. AbortOnDrop moves to util::concurrency so the reader and the write path share it.
A large base-file read went out as one GET on one connection, so a big column chunk was capped at that connection's throughput. SplittingReader sits innermost, under the read-volume counters. It coalesces the requested ranges the way object_store does, and splits each coalesced range larger than 8 MiB into near-equal parts fetched concurrently, at most 8 in flight per call. Parts are copied into one buffer per coalesced range as they land, and the requested ranges are sliced from those buffers without copying. A call whose coalesced ranges all fit in one part is passed through unchanged, and io_calls still counts a split call once.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1004 +/- ##
==========================================
- Coverage 90.96% 90.95% -0.01%
==========================================
Files 154 154
Lines 22070 22260 +190
==========================================
+ Hits 20076 20247 +171
- Misses 1994 2013 +19 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
1 of 4 tasks
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.
closes #1000
Description
Stacked on #1003; review the last commit.
Large base-file reads were one GET on one connection.
SplittingReader, innermost under the read-volume counters, coalesces ranges the wayobject_storedoes, then splits ranges larger than 8 MiB into concurrent parts (at most 8 in flight per call), assembled in place into one buffer per merged range; requested ranges are sliced from it zero-copy. Small reads are unchanged, andio_callscounts once per call. A connection cap shared across readers is left for a follow-up.Impact, measured on an earlier revision of this change applied together with #1002: TPC-H Q6 at SF100 on S3 through DuckDB went from 6.60-7.05 s to 5.79-5.93 s at 16 threads (-13%), with 32 threads unchanged (3.72-3.97 s to 3.67-3.68 s). Over the 22-query SF10 S3 run, leaving out Q5 (whose plan #1002 changes), the warm total went from 32.5 s to 30.6 s and the cold total from 74.3 s to 70.8 s.
How are the changes test-covered
New tests check that split reads return the same bytes as unsplit ones, over an in-memory reader and an object store, and cover coalescing, part tiling, out-of-order completion, failed and mis-sized parts, and call counting.