Skip to content

fix(index): prevent maintenance from undoing index drops - #8984

Merged
majin1102 merged 1 commit into
mainfrom
gatekeeper/fix-8982-1
Sep 4, 2026
Merged

fix(index): prevent maintenance from undoing index drops#8984
majin1102 merged 1 commit into
mainfrom
gatekeeper/fix-8982-1

Conversation

@lance-gatefixer

Copy link
Copy Markdown
Contributor

Summary

  • reject stale index replacement when a concurrent transaction removes the exact source segment
  • reject append-style index segments when the same logical index is concurrently removed
  • keep pure concurrent drops and disjoint physical-segment changes compatible

Root cause

CreateIndex conflict detection compared only new_indices names. A drop is encoded with an empty new_indices list, so stale optimize or append operations could be rebased after it and publish index metadata again.

Validation

  • cargo test -p lance io::commit::conflict_resolver::tests --lib
  • cargo fmt --all -- --check
  • cargo clippy --all --tests --benches -- -D warnings

Fixes #8982

@github-actions github-actions Bot added the bug Something isn't working label Sep 4, 2026
@lance-gatefixer

Copy link
Copy Markdown
Contributor Author

Blocked: PR #8984 remains blocked by an unrelated flaky Rust linux-build check at head 7c77814.

The linux-build check (Actions run 33836370883, job 100909623017) failed in test_create_ivf_hnsw_pq_multivec because recall was 0.4, below the required 0.5. The PR changes only rust/lance/src/io/commit/conflict_resolver.rs; focused runs passed repeatedly before reproducing the identical failure after 36 consecutive passes, and all 65 conflict-resolver tests pass.

Please re-run the failed linux-build job. Alternatively, stabilize the flaky vector-recall test independently and then re-run CI.

@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.

The resolver now rejects stale replacement and append-style index maintenance when a concurrent drop invalidates the relevant source identity, while preserving idempotent drops and disjoint segment changes.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Sep 4, 2026
@lance-gatefixer

Copy link
Copy Markdown
Contributor Author

Blocked: PR #8984 remains blocked at head 7c77814 by the unrelated flaky Rust linux-build check.

The current-head linux-build check (Actions run 33836370883, job 100909623017) failed in test_create_ivf_hnsw_pq_multivec because recall was 0.4, below the required 0.5. Same-head focused runs pass repeatedly, with a stress loop reproducing the identical assertion only after 36 consecutive passes; the repair changes only conflict-resolution logic, all 65 conflict-resolver tests pass, and every other CI check passes.

Please re-run the failed linux-build job. Alternatively, stabilize the flaky vector-recall test independently and then re-run CI.

@majin1102 majin1102 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.

LGTM. The conflict semantics and regression coverage look correct. The nested predicates could potentially be simplified into normalized index-change sets in a follow-up, but I don’t consider that blocking.

@majin1102
majin1102 merged commit 4cc5c58 into main Sep 4, 2026
48 of 49 checks passed
@majin1102
majin1102 deleted the gatekeeper/fix-8982-1 branch September 4, 2026 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working K-approved Latest Gatekeeper recommendation permits acceptance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Concurrent index optimization can resurrect a dropped index

1 participant