Repository navigation
fix(index): conflict CreateIndex with a DataReplacement of a packed parent - #10341
Merged
Xuanwo merged 6 commits intoOct 29, 2026
Merged
Conversation
…r-10341-merge-20261029
…r-10341-merge-20261029
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.
A
DataReplacementof a packed struct rewrites the file that holds its children. The CreateIndex rebase check compared field ids directly, so an index ons.xcould commit over a concurrent replacement ofsand return stale rows.The check now uses
field_affects_indexwith the read schema. A replacement of a packed parent conflicts with an index on any of its children. The conflict is retryable, the same as a direct replacement of the indexed field.Behavior change: in this race,
create_indexandcommit_existing_index_segmentsnow return a retryable conflict instead of committing a stale index.Tests
The new tests are in
concurrent_reindex.rs, which already has the commit-race helpers.create_indexons.xand a staged segment committed withcommit_existing_index_segments, each racing a DataReplacement ofswith no compaction. Onmainboth commit, and the index returns 0 rows fors.x = 333where a scan returns 1. With this change both fail with a retryable conflict.merge_insertwithRewriteColumnson the same row returns correct rows before and after this change.index::tests: 1,590 passed, 1 ignored.cargo clippy -p lance --tests -- -D warningspasses.I found this while working on #10096. It is a separate bug.
Fixes #10340