Skip to content

fix(index): harden compaction remapping and index commit conflicts - #9821

Draft
kushudai wants to merge 2 commits into
lance-format:mainfrom
kushudai:kudai/harden-compaction-and-index-conflicts
Draft

kushudai wants to merge 2 commits into
lance-format:mainfrom
kushudai:kudai/harden-compaction-and-index-conflicts

Conversation

@kushudai

@kushudai kushudai commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Compaction:

  • Accept tasks that list their fragments out of id order. Row-address capture failed on them, Direct remap paired old and new rows wrongly, and committing the rewrite group panicked.
  • Validate each task's row addresses before fragment ids are reserved. A bad payload used to corrupt indices (Direct), fail only after the reservation (Compact), or commit an unreadable fragment reuse index (deferred remap).

Conflict resolution:

  • A v0 fragment reuse cleanup or drop that retires mappings a concurrently built index still needs now fails whichever commit lands second with a retryable conflict. Before, the index returned wrong results or was silently unusable.
  • CreateIndex now conflicts with a concurrent Project that dropped its field, or a Merge that dropped or retyped it; the Merge check used to run only on tagged tables. Before, the index could land keyed on a field id the schema no longer has, failing every filtered scan.

Compaction:

- Accept tasks that list their fragments out of id order. Row-address
  capture failed on them, Direct remap paired old and new rows wrongly,
  and committing the rewrite group panicked.
- Validate each task's row addresses before fragment ids are reserved.
  A bad payload used to corrupt indices (Direct), fail only after the
  reservation (Compact), or commit an unreadable fragment reuse index
  (deferred remap).

Conflict resolution:

- A v0 fragment reuse cleanup or drop that retires mappings a
  concurrently built index still needs now fails whichever commit lands
  second with a retryable conflict. Before, the index returned wrong
  results or was silently unusable.
- CreateIndex now conflicts with a concurrent Project that dropped its
  field, or a Merge that dropped or retyped it; the Merge check used to
  run only on tagged tables. Before, the index could land keyed on a
  field id the schema no longer has, failing every filtered scan.
@github-actions github-actions Bot added the bug Something isn't working label Oct 9, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant