Repository navigation
Avoid copying Thrift CloudFetch response buffers - #627
Merged
Merged
Conversation
Signed-off-by: Vu Anh Phung <vu.phung@databricks.com> Co-authored-by: Isaac <no-reply@databricks.com>
vuanhphung
temporarily deployed
to
azure-prod
November 19, 2026 07:21 — with
GitHub Actions
Inactive
vuanhphung
temporarily deployed
to
azure-prod
November 19, 2026 07:21 — with
GitHub Actions
Inactive
vuanhphung
temporarily deployed
to
azure-prod
November 19, 2026 07:21 — with
GitHub Actions
Inactive
Signed-off-by: Vu Anh Phung <vu.phung@databricks.com> Co-authored-by: Isaac <no-reply@databricks.com>
vuanhphung
temporarily deployed
to
azure-prod
November 19, 2026 15:37 — with
GitHub Actions
Inactive
vuanhphung
temporarily deployed
to
azure-prod
November 19, 2026 15:37 — with
GitHub Actions
Inactive
vuanhphung
temporarily deployed
to
azure-prod
November 19, 2026 15:37 — with
GitHub Actions
Inactive
vuanhphung
marked this pull request as ready for review
November 19, 2026 15:41
Resolve the main changes by merging (no force-push). Signed-off-by: Vu Anh Phung <vu.phung@databricks.com> Co-authored-by: Isaac <no-reply@databricks.com>
vuanhphung
temporarily deployed
to
azure-prod
November 19, 2026 20:06 — with
GitHub Actions
Inactive
vuanhphung
temporarily deployed
to
azure-prod
November 19, 2026 20:06 — with
GitHub Actions
Inactive
vuanhphung
temporarily deployed
to
azure-prod
November 19, 2026 20:06 — with
GitHub Actions
Inactive
There was a problem hiding this comment.
🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).
Verdict: 1 Nit
Looks good, no blocking issues. Switching arrayBuffer() to buffer() keeps the retry, LZ4 and telemetry paths the same. Both new tests check the change: one covers the fallback path, and the other runs a real-HTTP pooled Buffer, with a byteOffset view, through the Arrow converter.
Other findings
cathleeny
approved these changes
Nov 20, 2026
aakash-saravanan-db
approved these changes
Nov 20, 2026
This branch was previously 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.
Thrift CloudFetch's
arrayBuffer()copies node-fetch's already-consumed Buffer. A live 2.109 GB catalog-sales profile attributes 725 ms of self time to that copy; the candidate profile has zero samples there.Carry
response.buffer()directly through the Arrow handoff, removing one full-body allocation. Scheduling, concurrency 10, CloudFetch LZ4-off, retries, logging and telemetry stay unchanged. This is Thrift-only because kernel HTTP/body handling is native. There is a mechanical textual conflict with #610: whichever lands second must useconst bodyRead = response.buffer();inside its idle-timer wrapper. #623's row-limit path is untouched.Verification: 1806 unit tests (including 28 CloudFetch) and lint/format/types/build pass. A real-HTTP pooled-Arrow test catches the production-read copy mutant. Live Thrift 4/4, kernel 7/7 and full-value/null/limit parity passed on identical runtime code.
Independent adversarial measurements find 10–14% lower CPU and 7–15% lower median peak RSS on live catalog drains. Node 24.22.1; rotated fresh-process A/B, warm-ups discarded, shared live warehouse; medians:
Elapsed gains are not repeatable at 216 MB or on materialized/storage-bound results; no universal/tail speedup is claimed. Largest materializations hit the 115 s cap on both revisions. Accepted baseline: mid-download close/cancel emits one error-telemetry event on both main and branch, pre-existing on main and unchanged by this PR; neither produces ERROR logs or unhandled rejections.
Adversarial review: round 1 converged with no high findings; evidence wording corrected, production-path coverage added, and unchanged lifecycle telemetry accepted separately.
This pull request and its description were written by Isaac.