Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add has_merging_threads function to IndexWriter #2553

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kryesh
Copy link
Contributor

@kryesh kryesh commented Dec 3, 2024

Adding a function to IndexWriter that returns true if there are merges running and false otherwise, this is useful for applications that have multiple indices that may want to shut down idle writers to conserve memory.

This is a cleaner solution to that idle index use case than running wait_merging_threads since calling that blocks until the merges are done while keeping the index locked, This increases latency (sometimes considerably so depending on the merge size) if you need to create a new writer because the index is no longer idle.

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.

1 participant