Skip to content

fix: filter stale scalar index fragments#7825

Draft
timsaucer wants to merge 2 commits into
lance-format:mainfrom
rerun-io:tsaucer/filter-stale-scalar-index
Draft

fix: filter stale scalar index fragments#7825
timsaucer wants to merge 2 commits into
lance-format:mainfrom
rerun-io:tsaucer/filter-stale-scalar-index

Conversation

@timsaucer

@timsaucer timsaucer commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Closes #7803

Keep fragment coverage filtering separate from deletion masks so stale row addresses cannot reach take operations without expanding sparse deletion masks.

Keep fragment coverage filtering separate from deletion masks so stale row addresses cannot reach take operations without expanding sparse deletion masks.

AI Disclosure: This code was written in part by an AI agent.
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f537d85f-d8c6-4465-8df6-5ca3bae08fba

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the bug Something isn't working label Jul 16, 2026
Represent excluded legacy fragments as compact full-fragment blocks so all mask consumers enforce index coverage without expanding sparse deletion masks. Strengthen legacy vector and manifest boundary coverage.

AI Disclosure: This code was written in part by an AI agent.
unique_ids.len(),
ids.len()
actual_ids,
expected_ids.iter().map(String::as_str).collect(),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assertion does not compile at the current head: the collect() result is ambiguous (E0283) because HashSet can compare against multiple borrowed forms. The same type error prevents the Rust build, clippy, MSRV, ARM, and no-lock targets from reaching the regression tests, so the fix cannot be validated in its current form.

.chain(&self.excluded_fragments)
.flat_map(|fragments| fragments.iter());
let mut fragment_block_list = RowAddrTreeMap::new();
for fragment_id in blocked_fragments {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For an old or partial index, excluded_fragments can cover nearly 0..=max_fragment_id. This loop expands every historical ID into a RowAddrTreeMap entry on query startup, so memory and CPU scale with dataset history rather than current rows or index coverage. A high-churn dataset with a small current index can therefore create an unbounded vector/FTS query-time resource regression.

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

2 participants