apache / apache/lucene

Add a separate "registration" singleton for Lucene's SPI, so there is only one central instance to request rescanning of classpath (e.g. from Solr's ResourceLoader) [LUCENE-4823]

Open
#5,888 2 comments 0 reactions 1 assignee Claimed by @uschindler View on GitHub
legacy-jira-fix-version:4.9 legacy-jira-fix-version:6.0 legacy-jira-priority:Major module:core/other type:bug
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

Currently there is no easy way to do a global "rescan/reload" of all of Lucene's SPIs in the right order. In solr there is a long list of reload instructions in the ResourceLoader. If somebody adds a new SPI type, you have to add it there.

It would be good to java a central instance in oal.util that keeps track of all NamedSPILoaders and AnalysisSPILoaders (in the order they were instantiated), so you have one central entry point to trigger a reload.

This issue will introduce:
- A singleton that makes reloading possible. The singleton keeps weak refs to all loaders (of any kind) in the order they were created.
- NamedSPILoader and AnalysisSPILoader cleanup (unfortunately we need both instances, as they differ in the internals (one keeps classes, the other one instances). Both should implement a "reloadable" interface.

---
Migrated from [LUCENE-4823](https://issues.apache.org/jira/browse/LUCENE-4823) by Uwe Schindler (@uschindler), updated May 09 2016

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.