Skip to content

fix: handle inverted index worker exits during dispatch#6129

Merged
BubbleCal merged 2 commits intomainfrom
yang/fix-fts-index-stuck
Mar 9, 2026
Merged

fix: handle inverted index worker exits during dispatch#6129
BubbleCal merged 2 commits intomainfrom
yang/fix-fts-index-stuck

Conversation

@BubbleCal
Copy link
Copy Markdown
Contributor

@BubbleCal BubbleCal commented Mar 8, 2026

this drops all receivers if all workers have failed, so that dispatching can be stopped

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 8, 2026

ACTION NEEDED
Lance follows the Conventional Commits specification for release automation.

The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification.

For details on the error please inspect the "PR Title Check" action.

@BubbleCal BubbleCal changed the title Handle inverted index worker exits during dispatch fix: handle inverted index worker exits during dispatch Mar 8, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 8, 2026

PR Review

Good fix — the old code would panic (expect("failed to send batch")) when a worker exited early due to an error because the receiver side was dropped. Replacing that with a graceful is_err() check + break and then propagating the real worker error via index_task.await?? is the right approach. The drop(receiver) after spawning ensures the channel lifetime is properly tied to the workers. Test coverage looks solid.

One nit:

Typo in comment (builder.rs): "this only happens if all workers have existed" → should be "exited".

@github-actions github-actions Bot added the bug Something isn't working label Mar 8, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 8, 2026

Codecov Report

❌ Patch coverage is 85.71429% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
rust/lance-index/src/scalar/inverted/builder.rs 85.71% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

@BubbleCal BubbleCal merged commit d96455c into main Mar 9, 2026
29 checks passed
@BubbleCal BubbleCal deleted the yang/fix-fts-index-stuck branch March 9, 2026 06:02
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.

2 participants