fix: relax DataReplacement conflict with concurrent Delete/Update#7433
Merged
wkalt merged 2 commits intoJun 24, 2026
Merged
Conversation
lance-format#7373 made a DataReplacement conflict with any concurrent Update/Delete that touched a target fragment. That is too conservative: a delete that only adds a deletion vector leaves the positional column file aligned, and build_manifest rebases the replacement onto the current fragment, preserving the deletion vector. A DataReplacement vs a concurrent Delete/Update now conflicts only when: - the target fragment is removed outright -- returns a non-retryable IncompatibleTransaction so the caller can drop it and commit the rest; - a row-rewriting (RewriteRows) update moves the matched rows out to new fragments the positional file does not cover; or - the update rewrote one of the replaced fields in place (fields_modified). Deletion-vector-only deletes/updates and non-overlapping column rewrites are now allowed.
Update the DataReplacement compatibility table to match the refined conflict resolver: full fragment removal by Delete/Update is now a non-retryable conflict, Update is a retryable conflict only when it moves rows out of a target fragment or rewrites one of the replaced fields, and a deletion-vector -only Delete/Update is compatible.
Contributor
|
Important This PR touches the Lance format specification. Substantive changes to the format specification — the If this is a meaningful format change:
|
wkalt
approved these changes
Jun 24, 2026
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
#7373 made a DataReplacement conflict with any concurrent Update/Delete that touched a target fragment. That is too conservative: a delete that only adds a deletion vector leaves the positional column file aligned, and build_manifest rebases the replacement onto the current fragment, preserving the deletion vector.
A DataReplacement vs a concurrent Delete/Update now conflicts only when:
Deletion-vector-only deletes/updates and non-overlapping column rewrites are now allowed.