Repository navigation
perf(file): overlap and coalesce reads during concatenation - #10301
Merged
Merged
Conversation
Open independent parts with bounded concurrency and preserve caller order. Read small inputs across columns in one bounded scheduler request, sorting physical ranges and restoring logical buffer order before copying. Keep large-input streaming and existing identity, size, row and Blob checks. Cover interleaved pages, NULL buffers, invalid parts and bounded admission.
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
Contributor
There was a problem hiding this comment.
✅ Gate recommendation: approve.
No merge-blocking issues found. All 49 focused concat and data-file-part tests passed locally on this head, covering value preservation, reduced payload reads, bounded small- and large-part opens, caller order, and rejection before output creation. Both open-path cases also passed with LANCE_IO_THREADS=1.
Xuanwo
approved these changes
Oct 26, 2026
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.
Concatenating many staged data-file parts serializes each part's open/validation and then reads payloads one column at a time. For small parts containing vector output and auxiliary columns, these dependent object-store requests dominate concatenation.
This change opens up to
min(io_parallelism, 8)parts concurrently while preserving caller order and all existing validation, including #10315's single-GET validation for small parts and HEAD validation for larger parts. For modern files that fit within the existing read-batch budget, it submits payload ranges across columns together, sorted by physical offset, and restores their logical order before copying. Larger files retain streaming reads. There are no file-format or public API changes.The metadata-hint work in #9169 addresses a different source of read dependencies; this change does not require it.
Performance
Current-head performance has not been remeasured after merging main, including #10315's small-part single-GET validation. The earlier measurements below apply only to the stated historical commits and are not a performance claim for the merged head.
Historical benchmark before merging main
Measured
Dataset::concat_data_file_partsonly, from baselinec633e438c291dbf1781657a37ad489098438af21to the earlier candidate276d0ff57c792ac633c910928efa8d3ed97d8d96. Values are medians of three paired rounds; lower latency is better.The same AWS m7i.8xlarge host (32 vCPUs, 128 GiB RAM), four-CPU process affinity, and same-region S3 in us-east-1 were used for both builds, with Rust 1.98.1 and the repository's
release-no-ltoprofile for this I/O-bound workload. Input was frozen output containing 1,000,000 rows, a 384-dimensional Float32 vector, and five auxiliary columns, written as Lance 2.2. Twenty 50,000-row splits were subdivided into parts of at most 8,192, 1,563, or 50,000 rows. These are controlled part layouts, not a reconstruction of adaptive Function Engine output partitioning.Each run used a fresh fixture and process, with alternating baseline/PR order and rotating scenarios; no other builds ran during measurement. Full Arrow equality across all rows and all six columns was checked after concatenation, outside the timer. S3 cache state was not controlled. Observed latency ranges were 48.99–54.30 s / 30.19–33.81 s for 140 parts, 202.13–211.54 s / 40.62–56.00 s for 640 parts, and 12.00–12.28 s / 10.53–11.61 s for 20 parts (baseline / PR).
Network allowance counters increased in every 140-part and 20-part observation window, so those results describe this host's network budget. All six 640-part windows had zero allowance-exceeded increments. Counter windows enclosed concatenation and excluded bulk result validation; they were not exact phase boundaries. These results do not measure end-to-end Function Engine refresh, upload, or checkpoint performance.
Object-store read/HEAD calls fell from 840 to 420 for 140 parts and from 3,840 to 1,920 for 640 parts; the 20-part fallback remained at 200 calls. Output sizes and write-call counts were unchanged. Counts are at the object-store layer, not retry-inclusive HTTP requests.
Validation after merging main
Validated merge commit
25120495af468dad17496d881d087704e0ea45ed, including main71a1b76581c340cd29fc6d837b36efead2afa23b.LANCE_IO_THREADS=1. The small-part case requires zero HEAD requests and exactly one GET per part; both cases check bounded fanout and caller order.--all --tests --benches -- -D warnings) passed.Validation commands (macOS ARM64, Rust 1.98.1)