Repository navigation
fix(index): reject mixed row domains in scalar index segments - #10004
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.
zhangyue19921010
approved these changes
Oct 15, 2026
zhangyue19921010
left a comment
Collaborator
There was a problem hiding this comment.
Nice Catch~ LGTM
We can land it after ci passed.
This was referenced Oct 16, 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.
Staged commits can combine legacy B-tree segments containing row IDs with current segments containing row addresses under the same index name. The logical reader treats every result as belonging to its first segment's domain, silently losing matches on stable-row-ID tables.
Validate the final set of segments when building a CreateIndex manifest, including retained siblings and retried commits. Also reject mixed domains when constructing a logical scalar index. Replacing every segment in one commit remains supported; the format and valid legacy readers are unchanged.
Regression coverage uses a checked-in dataset written by v14.0.0-beta.15. It covers partial migrations in both directions, incoming segment order, direct transactions, logical reader construction, unchanged manifests after rejection, NULL queries, and complete replacement. The five commit regressions fail before the fix. The partial-merge regression uses the same released fixture to verify that legacy segments outside the requested merge window also join the rebuild.
Validation: all 7 regression cases, 9 B-tree maintenance tests, 15 existing staged-commit tests, 21 logical-scalar tests, and 235 transaction tests passed.
cargo fmt --allandcargo clippy --all --tests --benches -- -D warningspassed.uv run make build,uv run make lint, and the historical fixture generator's Ruff checks passed.The B-tree compatibility fixture now distinguishes the beta.16 reader capability from the peer-environment role. It preserves the existing post-compaction query checks, then restores index coverage for capable readers before checking the next reader. Both old-reader scan fallback and supported-reader index usage remain enforced.
The identical Python change passed 9 harness regression cases and 8 downgrade/round-trip cases using published 0.39.0, 13.0.0, 14.0.0b15, and 14.0.0b16 readers.
uv run make lintpassed. Both PRs have the same Python source and dependency tree; CI validates each native build separately.