[ https://issues.apache.org/jira/browse/SOLR-14232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17051325#comment-17051325 ]
David Smiley commented on SOLR-14232: ------------------------------------- [~noble.paul] lets discuss the imperfections of shareSchema here and not SOLR-14040 bq. This can cause ClassCastException if the per core component is sharing an object with schema Did did you see this and can you try to explain more specifically how this can happen? Your explanation wasn't bad but I don't quite understand enough to, for example, write a test showing it. I'm trying to ascertain how avoidable the problem is. If triggering it requires a schema component that implements SolrCoreAware then that doesn't really count as it's avoidable. > 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