Skip to content

[WIP] [lumina] Reuse LuminaSearcher across queries via searcher pool#7674

Open
chenghuichen wants to merge 1 commit into
apache:masterfrom
chenghuichen:lumina-fix
Open

[WIP] [lumina] Reuse LuminaSearcher across queries via searcher pool#7674
chenghuichen wants to merge 1 commit into
apache:masterfrom
chenghuichen:lumina-fix

Conversation

@chenghuichen
Copy link
Copy Markdown
Contributor

Purpose

Tests

@chenghuichen chenghuichen changed the title [WIP][lumina] Reuse LuminaSearcher across queries via searcher pool [WIP] [lumina] Reuse LuminaSearcher across queries via searcher pool Apr 20, 2026
Copy link
Copy Markdown
Contributor

@JingsongLi JingsongLi left a comment

Choose a reason for hiding this comment

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

This PR is marked as [WIP]. A few observations:

  1. Searcher Pool design: The LuminaSearcherPool concept is valuable for reusing expensive searcher instances across queries. Key questions:

    • What's the eviction strategy? LRU? Time-based?
    • Is the pool bounded? What happens when it fills up?
    • How does refresh work when the underlying index is updated (e.g., after compaction adds new segments)?
  2. Thread safety: Vector index searchers may hold file handles or memory-mapped regions. Ensure the pool handles concurrent access correctly — particularly the case where a searcher is returned to the pool while still being used by another thread.

  3. Resource cleanup: When the pool is closed, all pooled searchers must release their native resources (e.g., Lucene IndexReader handles, mmap regions). Is there a close() method on the pool?

  4. PR description is empty ("Purpose: / Tests:") — please fill in the design rationale and test plan before requesting review.

Happy to look more closely once this is ready for review.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants