Repository navigation
fix(index): withdraw coverage when restore revives deleted rows - #10915
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.
There was a problem hiding this comment.
✅ 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.
Xuanwo
left a comment
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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.
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:
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 -- --checkpassed.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