[core] Reuse whole-file Parquet metadata prefetch - #994
Draft
XiaoHongbo-Hope wants to merge 2 commits into
Draft
XiaoHongbo-Hope wants to merge 2 commits into
XiaoHongbo-Hope wants to merge 2 commits into
Conversation
XiaoHongbo-Hope
marked this pull request as draft
September 28, 2026 22:50
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.
Purpose
Small Parquet objects are read twice today: metadata loading prefetches the
complete object, then the Arrow stream requests its data range from storage
again. This is especially expensive on object stores where request rate, rather
than transferred bytes, is the limiting resource.
In an anonymized one-minute production sample, 48,872 distinct Parquet objects
produced 387,280 client/file pairs and 801,034 GETs. Every object was at most
512 KiB, and 77.7% were at most 16 KiB. At the peak second, eliminating the
redundant request would have removed approximately 37k Parquet GET/s (about 49%
of Parquet GETs and 8.5% of all bucket requests in that second), assuming one
metadata/data pair per client and file.
Brief change log
ParquetFileReaderlifecycle.lifetime and serve later byte ranges as zero-copy
Bytesslices.existing range-read path.
The retained allocation is bounded to 512 KiB per active small-file reader. It
is neither a process-wide body cache nor an additional copy of the response.
Tests
performs one underlying read for a small file.
reuse the same prefetched object.
the existing read path.
exercise actual underlying reads.
cargo test -p paimon --lib(3442 passed, 6 ignored)cargo clippy -p paimon --all-targets -- -D warningscargo fmt --all -- --checkAPI and Format
No public API or storage-format change.
Documentation
No user-facing documentation change is required.