perf(transaction): backport O(M+N) fragment matching in build_manifest onto v7.0.0 - #10
Merged
Conversation
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
ryantqiu
approved these changes
Aug 14, 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.
Summary
Backports upstream lance-format#8210 (commit
14c5f3cc) onto thev7.0.0tag, for a patched pylance 7.0.0 build used by the silk_node column-backfill committer.Transaction::build_manifestforUpdate/Deletematched each existing dataset fragment against the transaction's fragments with a linear scan (updated_fragments.iter().find(|uf| uf.id == f.id)) → O(M×N). With ~3M dataset fragments and 8192-fragment backfill commits this dominates commit time (observed 300s → 1200s+ growth per commit). The backport replaces the scans with pre-built lookups:Deviations from the upstream commit (v7 differences only, semantics identical):
updated.overlays = f.overlays.clone()+tombstone_overlay_fieldsunderRewriteColumns) is preserved inside the map-lookup branch.merged_generationsfield name (upstream renamed itcompacted_sstables) andLanceFileVersion::V2_0in the test helper.Verified:
cargo check -p lanceclean, all 53dataset::transactiontests pass (incl. the two new tests from lance-format#8210), rustfmt clean.Link to Devin session: https://app.devin.ai/sessions/9589ce7177cd42afbae9db44fc352d5b
Requested by: @ryantqiu