Repository navigation
feat: deduplicate keyed append commits - #11411
Merged
Merged
Conversation
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.
BubbleCal
approved these changes
Nov 24, 2026
This was referenced Nov 25, 2026
This was referenced Nov 30, 2026
westonpace
added a commit
that referenced
this pull request
Dec 1, 2026
## Summary Transaction files were named `<read_version>-<transaction.uuid>.txn`, so submitting an already-committed transaction again (for example, a retry after an ambiguous timeout) wrote to the committed version's transaction file. If that attempt then failed, its cleanup deleted the file, and reading that version's transaction or catching up past it failed with `NotFound`. Keyed appends (#11411) already used a fresh per-attempt id; this makes every transaction file use one. Readers find the file through `manifest.transaction_file` and never parse the name. ## Evidence Two regressions in `commit::tests`, both failing before this change and passing after: - `failed_resubmission_keeps_committed_transaction_file` commits an append, resubmits it with a commit handler that conflicts, and asserts the committed version's transaction file still exists on disk. - `failed_resubmission_keeps_spilled_transaction` (attached and detached) does the same against a transaction too large to inline, so the committed version is readable only through its transaction file. It asserts the recorded transaction still reads back and that a stale attached writer can catch up past the committed version. Both cases fail with `NotFound` without the fix. ## Merge Risk **Door:** two-way. The name still matches the documented `{read_version}-{uuid}.txn` pattern; only the UUID's source changes. **Blast Radius:** commit path. ## Validation - `cargo test --profile ci -p lance-table-runtime --lib --features tokio/test-util`: 575 passed. - `cargo fmt --all --check`. - `cargo clippy -p lance-table-runtime --all-targets`: no warnings in this crate. (`-D warnings` trips on two pre-existing dead-code items in `lance-io`, untouched here.) Fixes #11656 --------- Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Weston Pace <[email protected]>
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.
An append retry can reach manifest publication after another writer has committed the same logical append. Both writers can otherwise rebase and commit, leaving duplicate rows.
The Lance Rust crate adds
CommitBuilder::with_append_idempotency_propertyfor individual appends to an existing branch. The caller supplies the property in the transaction and reuses its value and original read version on every submission. The first committed append wins. A duplicate returns the winning version throughError::append_already_committed_version()without publishing a new version. A history gap prevents a keyed append when the winner cannot be established.The commit loop checks transactions directly from the published manifests so that a session reused after table recreation sees the current table's keys. It also checks a winning manifest after a commit collision, including when no retries remain. Keyed attempts use separate transaction files so a replay can submit the same transaction without sharing the winner's file.