Skip to content

fix(index): use read snapshot for cleanup coverage checks - #10916

Merged
Xuanwo merged 3 commits into
mainfrom
gatekeeper/fix-10912-1
Nov 11, 2026
Merged

Xuanwo merged 3 commits into
mainfrom
gatekeeper/fix-10912-1

Conversation

@lance-gatefixer

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

Copy link
Copy Markdown
Contributor

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:

  • Expanded cleanup regression: 16 passed. The four newer-handle/URI payload cases fail before the fix.
  • 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 -- --check and cargo clippy --profile ci --all --tests --benches -- -D warnings passed.

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]
Loading

Untouched fragments and preserved join keys retain index coverage.

Read: Snapshot handoff → Read fragments and schema → Regression modes.

Snapshot: 7d6d6b1

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

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.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Nov 11, 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.

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.

@Xuanwo
Xuanwo merged commit 455f95c into main Nov 11, 2026
41 checks passed
@Xuanwo
Xuanwo deleted the gatekeeper/fix-10912-1 branch November 11, 2026 00:36
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: post-cleanup in-place rewrite check compares against the commit handle, not the read version

1 participant