Repository navigation
Prefetch next manifest during current manifest parse - #108543
Conversation
|
Workflow [PR], commit [dd51228] Summary: ❌
AI ReviewSummaryThis PR adds one-manifest-ahead prefetching to the Iceberg manifest iterator so manifest I/O can overlap with processing of the current manifest, and backs it with a failpoint-driven integration test. I rechecked the latest code and prior discussion, including the future-lifetime throw paths and the strengthened timing assertion, and I did not find a remaining correctness, compatibility, or evidence issue that should block the change. Final Verdict
|
|
|
||
| logging.info("SELECT * over %s manifests took %.3f seconds", NUMBER_OF_MANIFESTS, duration) | ||
|
|
||
| assert duration < MAX_SELECT_SECONDS, ( |
There was a problem hiding this comment.
Mostly a sanity check and tool for future use. I've noticed it takes ~30% less time (0.6 -> 0.42 seconds), although real-worlds diffs will depend on how large the manifest files are.
|
📊 Cloud Performance Report ✅ AI verdict: This change is confined to Iceberg manifest-file prefetching in the object-storage data-lake iterator (plus a test-only failpoint and integration test); ClickBench queries run on a native table and never touch that code path. The two flagged deltas on Q4 (-22.0%) and Q15 (-14.3%) are improvements that fall inside master's normal variance band, and CPU time is essentially unchanged on both, so there is no work-backed effect. The deterministic no_change verdicts are correct and consistent with the diff. No real per-query performance impact from this PR. clickbench🟢 No significant changes tpch_adapted_1_official🟢 No significant changes Debug info
|
|
|
||
| logging.info("SELECT * over %s manifests took %.3f seconds", NUMBER_OF_MANIFESTS, duration) | ||
|
|
||
| assert duration < MAX_SELECT_SECONDS, ( |
There was a problem hiding this comment.
I don't understand this check. If the failpoint is enabled, retrieving a single manifest takes about 100 ms. Consequently, sequential reading will take approximately 100 ms * NUMBER_OF_MANIFESTS, which is significantly less than 60 seconds.
There was a problem hiding this comment.
I meant it as a sanity check -- was trying to be cautious in case things were slower in CI for whatever reason. I'll try setting it to 0.6 seconds and see if it holds up.
|
|
||
| void SingleThreadIcebergKeysIterator::schedulePrefetchIfPossible() | ||
| { | ||
| if (!data_snapshot || prefetched_manifest.has_value()) |
There was a problem hiding this comment.
Am I right that we can prefetch only next manifest? If so, I think we can improve it via creating cache for N manifests
There was a problem hiding this comment.
Yes, it could be nice to have a small, tunable deque of prefetched_manifests. For the sake of simplicity, I won't include it in this PR, but we could add it as a future optimization.
There was a problem hiding this comment.
Another option is to have multiple concurrent producer threads.
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered: 58/59 (98.31%) · Uncovered code |
|
Closes issue #105049. |
Changelog category (leave one):
Changelog entry (a [user-readable short description]):
Speed up reading of Iceberg tables by prefetching the next manifest file while the current manifest is being parsed, overlapping I/O with CPU work.
Version info
26.8.1.286(included in26.8and later)