Repository navigation
fix(index): use read snapshot for cleanup coverage checks - #10916
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.
Using the transaction’s original read snapshot prevents stale index coverage when cleanup hides intervening rewrites, including commits through newer handles or URIs. Coverage remains available for untouched fragments and fields, and the updated revival guard preserves the restored-row protection from #10915.
Xuanwo
left a comment
There was a problem hiding this comment.
Reviewed the current head against the accepted read-snapshot contract and the landed revival guard. Full current-head CI and Gatekeeper completed successfully. No blocking findings.
An index staged against an older read version could retain stale fragment coverage when committed through a newer dataset handle or
CommitBuilder::new(uri). After cleanup removed an in-place rewrite's transaction, the safety check compared the submission handle's fragments with the latest manifest and missed the changed values.Supply the transaction's read snapshot to the index rebase checks, including its schema, and use the same fragment snapshot for retired-coverage withdrawal. Extend the existing cleanup regression across immediate creation, staged publication, newer handles, and URI commits on ordinary and tagged fragment-reuse tables. The tests verify indexed queries against index-disabled scans and preserve coverage for untouched fragments and join keys.
Validation:
cargo test --profile ci -p lance --lib io::commit::conflict_resolver::tests: 212 passed.cargo test --profile ci -p lance --lib index::create::tests: 92 passed.cargo fmt --all -- --checkandcargo clippy --profile ci --all --tests --benches -- -D warningspassed.Fixes #10912
Change walkthrough
flowchart LR A[Transaction read snapshot] --> C[Index rebase checks] B[Latest manifest] --> C C --> D[Withdraw rewritten coverage] D --> E[Commit index]Untouched fragments and preserved join keys retain index coverage.
Read: Snapshot handoff → Read fragments and schema → Regression modes.
Snapshot: 7d6d6b1