Skip to content

fix(index): read single-partition shuffle offsets once - #11130

Merged
wjones127 merged 1 commit into
mainfrom
gatekeeper/fix-11129-1
Nov 19, 2026
Merged

wjones127 merged 1 commit into
mainfrom
gatekeeper/fix-11129-1

Conversation

@lance-gatefixer

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

Copy link
Copy Markdown
Contributor

Fixes #11129

With a single shuffle partition, consecutive write batches share an offset row. The on-demand reader requested that row twice, causing the file reader to reject overlapping ranges.

Read each end offset once and reuse the previous end as the next batch's start. Add parameterized regression coverage for one and three write batches, forced on-demand offsets, and a zero preload cap, comparing the returned values with the preloaded reader.

Validation:

  • Both multi-batch regression cases reproduced the reported overlap error before the fix.
  • cargo test -p lance-index --lib vector::v3::shuffler::tests: 47 passed.
  • cargo fmt --all: passed.
  • cargo clippy --all --tests --benches -- -D warnings: passed.

Change walkthrough

flowchart LR
    A{"One partition?"} -->|Yes| B["Read each end once"]
    A -->|No| C["Read boundary pairs"]
    B --> D["Reuse previous end"]
    D --> E["Build batch ranges"]
    C --> E
Loading

The first partition's first batch retains its implicit start offset of zero.

Read: Offset selection → Range reconstruction → Regression cases.

Snapshot: 9df59f8

@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 A-index Vector index, linalg, tokenizer bug Something isn't working and removed A-index Vector index, linalg, tokenizer labels Nov 16, 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 change fixes the single-partition on-demand failure in #11129 while preserving the reader’s ordered, disjoint-range contract. No blocking issues found.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Nov 16, 2026
@wjones127
wjones127 merged commit 43cd578 into main Nov 19, 2026
45 checks passed
@wjones127
wjones127 deleted the gatekeeper/fix-11129-1 branch November 19, 2026 19:08
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.

IVF shuffle read fails for a single partition when offsets are read on demand

1 participant