Repository navigation
[opt](file cache) Add PageIO read-ahead, I/O coalescing, and cache block hole filling #67292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
bobhan1
merged 21 commits into
apache:master
from
bobhan1:feature/read-ahead-io-coalescing-phase2
Oct 30, 2026
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
7654cf7
[feature](be) Add linear file range coalescing
bobhan1 90cf5b6
[feature](be) Add cache-aware file range planning
bobhan1 85894d0
[feature](be) Add file range read scheduler
bobhan1 c64e719
[feature](be) Reuse remote-only reads for no-write ranges
bobhan1 563b5ba
[feature](be) Add query read-ahead runtime ownership
bobhan1 e2a4012
[improvement](be) Add opt-in file range IO tracing
bobhan1 8a08ae1
[fix](be) Scope filesystem error-code imports to their functions
bobhan1 4271da9
[feature](be) Add page-driven column read-ahead windows
bobhan1 e7dbfa1
[feature](be) Add segment range read-ahead coordination
bobhan1 00fa56b
[feature](be) Connect scalar column readers to range read-ahead
bobhan1 8190e0f
[feature](be) Initialize scan read-ahead once after pruning
bobhan1 d03f274
[feature](be) Add complete-block cache write handoff and admission
bobhan1 a547700
[feature](be) Split consumed ranges for cache writeback
bobhan1 7cfe76c
[feature](be) Add cache block hole-fill planning
bobhan1 a7e3899
[feature](be) Add background partial block writeback
bobhan1 999f5c6
[feature](be) Initialize background hole fill
bobhan1 6fd7bb6
[feature](be) Route consumed ranges to cache writeback
bobhan1 1ae1272
[feature](be) Connect read-ahead range writeback
bobhan1 fd6df2c
[feature](be) Extend range read-ahead to point queries
bobhan1 a881473
[fix](be) Validate S3 upload buffer alignment on config updates
bobhan1 b237ebc
[fix](be) Handle irregular cache blocks in writeback coverage checks
bobhan1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[feature](be) Connect scalar column readers to range read-ahead
### What problem does this PR solve? Issue Number: Part of #67611 Related PR: #67579, #67292 Problem Summary: Prepare eligible top-level scalar pages once after pruning and advance scan windows at the data-page read entry before Page Cache lookup. Scalar point reads retain exact-row preparation. Report initialization and page-advancement time, then let ColumnReadAheadPlan accumulate its maintenance sub-timers. Preserve existing page decoding, cache hits and synchronous fallback. ARRAY/MAP/STRUCT, including offsets, null maps and nested children, keep the upstream reader implementation. Their children may have independent predicate/lazy ordinals, so this component adds no dependent-item preparation or cursor-equality assertion. Cover the nested STRUCT/MAP lazy-read crash and complex-column preparation boundary. ### Release note Connect top-level scalar data-page reads to byte-window read-ahead. ### Check List (For Author) - Test: Unit Test — 134 tests from 4 suites passed on the integrated #67579 tree with ./run-be-ut.sh -j100 --run (ASAN/PCH, no clean). Repository clang-format 16, header hygiene and git diff --check passed. No cluster or clang-tidy run. This intermediate component commit was not built separately. - Behavior changed: Yes — introduces opt-in scalar read-ahead while preserving complex-column behavior. - Does this need documentation: Yes — scope and synchronization are recorded in #67611 and the related PR descriptions.
- Loading branch information
commit 00fa56b67a25acac9ac6151699b76e61856ccd16
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P2] Track the retained read-ahead page metadata
Enabling read-ahead copies every physical page in each scalar column into this plain
std::vector, retained asColumnReadAhead::_pages; dense scans also retain_candidate_pagesand window-map nodes. These allocations have neither a tracked allocator nor manual MemTracker accounting, and happen before scheduler admission, so they survive even when every range is rejected. On 64-bit targets the two page arrays alone require at least 44 bytes per selected page: wide segments and concurrent scanners can retain substantial memory that query limits never see. Use tracked containers or balanced accounting/reservation for the planning metadata, preferably sharing immutable ordinal metadata, and cover the budget-rejection case.