Skip to content

fix(index): validate vector segments added by transaction actions - #11213

Merged
Xuanwo merged 4 commits into
mainfrom
gatekeeper/fix-10728-1
Nov 20, 2026
Merged

Xuanwo merged 4 commits into
mainfrom
gatekeeper/fix-10728-1

Conversation

@lance-gatefixer

@lance-gatefixer lance-gatefixer Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Transaction V2 AddIndexSegment actions skipped the vector compatibility validation already used by CreateIndex (#10761). Sequential commits or multiple additions could publish incompatible vector segments under one index name.

Apply that validation after all transaction actions have run, using the final segment list in regular and detached commits. Resolve new fields and storage bases through the proposed manifest. Incompatible additions fail, while complete replacements can change the index contract. File-based contract checks live in a dedicated IVF compatibility module, keeping ivf.rs within the module-size limit.

Fixes #10728

Validation:

  • Confirmed the regression before the fix: a raw Dot segment commit succeeded beside an L2 segment.
  • Passed 80 composite transaction tests, 29 raw index commit tests, and 8 index-file contract tests using the compiled ci profile test harness. The six new cases cover metric, quantization, and sub-index differences, regular and detached commits, newly added fields, copied details, and ANN recall after compatible replacements.
  • cargo fmt --all and cargo clippy --all --tests --benches --profile ci -- -D warnings passed.
  • python3 ci/check_module_size.py origin/main HEAD passed; ivf.rs is 389 KB, below the 400 KB limit.

Change walkthrough

flowchart LR
    A["AddIndexSegment actions"] --> B["Build proposed manifest"]
    B --> C["Compare surviving segments"]
    C --> D{"Contracts compatible?"}
    D -->|Yes| E["Publish manifest"]
    D -->|No| F["Reject commit"]
Loading

Read contracts from segment files, resolving new fields and storage bases through the proposed manifest.

Read: Commit boundary → Compatibility validation → Regression cases.

Snapshot: 883a184

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions github-actions Bot added critical-fix Bugs that cause crashes, security vulnerabilities, or incorrect data. bug Something isn't working labels Nov 18, 2026
lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Nov 18, 2026
@lance-gatekeeper lance-gatekeeper Bot removed the K-approved Latest Gatekeeper recommendation permits acceptance. label Nov 18, 2026
lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Nov 18, 2026
Xuanwo and others added 2 commits November 20, 2026 08:55
Main moved these tests into their own module, where the readers were previously in scope through the parent module. The compatibility refactor moved those imports out, so import them in the consuming test module.
@lance-gatekeeper lance-gatekeeper Bot removed the K-approved Latest Gatekeeper recommendation permits acceptance. label Nov 20, 2026
@lance-gatefixer

Copy link
Copy Markdown
Contributor Author

Blocked: Build and Test with Java 25 failed because the CI runner could not resolve org.apache.maven.plugins:maven-jar-plugin:3.0.2 from Maven Central, before compilation or tests ran.

Head: 7bc93835e853c3eabbf190b7a2e5f8ef9680166b. The failing job logs report Could not find artifact ... maven-jar-plugin:jar:3.0.2 in central. The Java 11/17/21 matrix jobs were subsequently cancelled.

I inspected the logs, compared the Java build configuration with current main, and confirmed that both the plugin POM and JAR are currently downloadable from Maven Central. This repair does not change that configuration, and current main contains no relevant fix. The JNI build/tests and JNI Clippy/format checks passed. No source change or base merge is indicated by this failure.

Please rerun the failed jobs in this workflow run. If dependency resolution fails again, check the runner's Maven repository/cache configuration and restore artifact access before rerunning.

@lance-gatekeeper lance-gatekeeper Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Gate recommendation: approve.

Final-state validation continues to close the raw transaction admission gap while preserving atomic index replacement after the merge from main. All 125 targeted tests passed locally on this head: 80 composite transaction, 29 raw index commit, 8 file-contract, and 8 IVF optimize tests.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Nov 20, 2026
@Xuanwo
Xuanwo merged commit af8390c into main Nov 20, 2026
44 of 48 checks passed
@Xuanwo
Xuanwo deleted the gatekeeper/fix-10728-1 branch November 20, 2026 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working critical-fix Bugs that cause crashes, security vulnerabilities, or incorrect data. K-approved Latest Gatekeeper recommendation permits acceptance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: raw index commits can mix incompatible vector segments under one name

1 participant