Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
The shareSchema option in solr.xml allows cores to share a common IndexSchema, assuming the underlying schema is literally the same (from the same configSet). However this sharing has no protections to prevent an IndexSchema from accidentally referencing the SolrCore and its settings. The effect might be nondeterministic behavior depending on which core loaded the schema first, or the effect might be a memory leak preventing a closed SolrCore from GC'ing, or maybe an error. Example:
- IndexSchema could theoretically do property expansion using the core's props, such as solr.core.name, silly as that may be.
- IndexSchema uses the same SolrResourceLoader for the core, which in turn tracks infoMBeans and other things that can refer to the core. It should probably have it's own SolrResourceLoader but it's not trivial; there are complications with life-cycle of ResourceLoaderAware tracking etc.
- If anything in IndexSchema is SolrCoreAware, this isn't going to work!
- SchemaSimilarityFactory is SolrCoreAware, though I think it could be reduced to being SchemaAware and work.
- ExternalFileField is currently SchemaAware it grabs the SolrResourceLoader to call getDataDir which is bad. FYI In a separate PR I'm removing getDataDir from SRL.
- Should probably fail if anything is detected.
Attachments
Issue Links
- is part of
-
SOLR-14311 Shared schema should not have access to core level classes
- Open
- relates to
-
SOLR-14040 solr.xml shareSchema does not work in SolrCloud
- Closed