Allow to configure purge executor in org.apache.lucene.monitor.Monitor [LUCENE-9869]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
Extend org.apache.lucene.monitor.MonitorConfiguration with an ability to configure how cache purge task is scheduled by org.apache.lucene.monitor.Monitor (aka Luwak). In particular allow to use an external ScheduledExecutor.
Currently each new instance of org.apache.lucene.monitor.Monitor is creating a new thread in order to schedule a periodic cache purge task. This is fine as long as your application is using a small number of Monitor instances but if for some reason you want to create a large number of Monitor instances (e.g. to separate different business domains) you end up with excessive number of threads created.
---
Migrated from [LUCENE-9869](https://issues.apache.org/jira/browse/LUCENE-9869) by Paweł Bugalski, updated Jul 15 2021
Pull requests: https://github.com/apache/lucene/pull/99
Contributor guide
Research direction
Start with org.apache.lucene.monitor.MonitorConfiguration and org.apache.lucene.monitor.Monitor, then inspect how the periodic cache purge task is scheduled. Compare the existing behavior with the linked pull request and verify that an external ScheduledExecutor can be configured without creating an unnecessary per-Monitor thread; add or update coverage for both configured and default scheduling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- search
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100