[ https://issues.apache.org/jira/browse/SOLR-14232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17053037#comment-17053037 ]
Noble Paul commented on SOLR-14232: ----------------------------------- let's say we have classes shared between your solrconfig and schema core 1 is created with SRL1 . solrconfig uses SRL1, schema uses SRL1 (all good) core2 is created with SRL2 . solr uses SRL2, schmea uses SRL1 . If schema/solrconfig shares an object of say ClassX this can lead to ClassCastException it's avoidable if schema & solrconfig has no shared classes. Or even if you share they don't get passed around. If you use it internally in your org, it can be avoided if you are careful. We cannot have a public feature that can lead to such a bug. > Add shareSchema leak protections > -------------------------------- > > Key: SOLR-14232 > URL: https://issues.apache.org/jira/browse/SOLR-14232 > Project: Solr > Issue Type: Improvement > Security Level: Public(Default Security Level. Issues are Public) > Components: Schema and Analysis > Reporter: David Smiley > Priority: Major > > 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. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org