Skip to content

fix(index): withdraw coverage when restore revives deleted rows - #10915

Merged
Xuanwo merged 4 commits into
mainfrom
gatekeeper/fix-10913-1
Nov 10, 2026
Merged

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

Conversation

@lance-gatefixer

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

Copy link
Copy Markdown
Contributor

An index built after a deletion omits those rows. If Restore revives them before the index commits, claiming their fragment causes false-negative queries. Stale-handle commits could miss this after cleanup removed the restore transaction; distributed commits on untagged tables checked files and overlays without checking deletions.

Reuse the existing row-revival comparison in both coverage guards and withdraw only affected fragments from the new index's coverage, so their rows are scanned. Unchanged deletion files and additional deletions retain coverage. System-index metadata is excluded from the commit guard.

Validation on Rust 1.98.1:

  • Seven multi-fragment regression cases cover both commit paths, cleanup submissions through original and refreshed dataset handles, restores with and without a remaining deletion file, and additional-deletion controls. Indexed queries are checked against index-disabled scans and fragment coverage.
  • cargo test --profile ci -p lance --lib dataset::tests::merge_coverage - 55 passed.
  • cargo test --profile ci -p lance --lib index::provenance::tests - 7 passed.
  • cargo test --profile ci -p lance --lib io::commit::conflict_resolver::tests - 204 passed.
  • cargo fmt --all -- --check passed.
  • Workflow-matching all-workspace-feature Clippy for all targets and the Arrow ordering fixture passed.

Related draft: #9816 also addresses staged-segment restore validation. This repair covers row revival in both distributed commits and commits whose intervening restore history was cleaned up.

Fixes #10913

@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 the bug Something isn't working label Nov 10, 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 10, 2026
@lance-gatekeeper lance-gatekeeper Bot removed the K-approved Latest Gatekeeper recommendation permits acceptance. label Nov 10, 2026

@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 row-revival comparison closes both false-negative paths in #10913, including cleanup commits submitted through a refreshed handle, while preserving coverage across additional deletions. No blocking issues found.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Nov 10, 2026

@Xuanwo Xuanwo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved after source review and validation. The revival check withdraws only affected non-system index coverage, and the cleanup regression now covers submission through a refreshed handle while preserving the transaction read snapshot.

@Xuanwo Xuanwo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved on the final merge head after complete current-head CI and Gatekeeper validation. The docs-only main merge does not change the reviewed index repair or regression coverage.

@Xuanwo
Xuanwo merged commit ced35bf into main Nov 10, 2026
39 checks passed
@Xuanwo
Xuanwo deleted the gatekeeper/fix-10913-1 branch November 10, 2026 23:46
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.

bug: CreateIndex can cover rows a Restore revived, causing index false negatives

1 participant