Repository navigation
perf(cloudfetch): request chunks ahead of body admission - #508
Draft
vuanhphung wants to merge 1 commit into
Draft
vuanhphung wants to merge 1 commit into
vuanhphung wants to merge 1 commit into
Conversation
Signed-off-by: Vu Anh Phung <vu.phung@databricks.com> Co-authored-by: Isaac <no-reply@databricks.com>
This branch was successfully deployed
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.
Description
CloudFetch holds a window slot until a decoded chunk is consumed. Per-chunk traces show completed chunks sitting unread while download concurrency falls below the configured window. On the live pecotesting 1GB label (105 chunks), bounded request-ahead reduces native Rust drain latency without enlarging the decoded chunk window.
Send a bounded number of extra GETs, deferring body collection until window admission. Admission waiting does not spend the normal download budget; changed/expired links and closed idle responses fall back safely.
cloudfetch_download_aheadis opt-in (0–16); explicit zero overrides the proposed, unprovisioned int32 flagdatabricks.partnerplatform.clientConfigsFeatureFlags.cloudFetchDownloadAheadForKernel. Missing flag means zero. Default enablement remains a user decision because socket memory and RSS increase. This shares the core path across bindings and does not change HTTP client construction (#488) or SEA close handling (#459/#472).Testing
92 CloudFetch tests pass, including nullable values, ordering/limits, bounded admission, slow consumers, URL refresh, idle sockets and cancellation. Full checks, live edge cases and Python confirmation are in progress; this PR remains a draft.
Five fresh-process interleaved live pairs, excluded warmup, 16-chunk decoded window / lead16; empirical p95/p99 are maxima with n=5:
Additional notes
Adversarial review: pending; not ready for review or merge.
This pull request and its description were written by Isaac.