[
https://issues.apache.org/jira/browse/SOLR-8311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18132098#comment-18132098
]
Nick Shanin commented on SOLR-8311:
-----------------------------------
>From code reading against apache/main b73f03976fa,
>SolrResourceLoader.newInstance registers SolrCoreAware and ResourceLoaderAware
>instances only while the loader is not live
>(solr/core/src/java/org/apache/solr/core/SolrResourceLoader.java:658-697), so
>objects created later are not informed. Is this umbrella still needed for the
>remaining cases, or should it close in favour of the follow-up issues it links?
🤖 AI-generated 🤖
> SolrCoreAware and ResourceLoaderAware lifecyel is fragile - particularly with
> objects that can be created after SolrCore is live
> --------------------------------------------------------------------------------------------------------------------------------
>
> Key: SOLR-8311
> URL: https://issues.apache.org/jira/browse/SOLR-8311
> Project: Solr
> Issue Type: Bug
> Reporter: Chris M. Hostetter
> Priority: Major
>
> In general, the situation of when/how {{ResourceLoaderAware}} &
> {{SolrCoreAware}} instances are "informed" of the ResourceLoader & SolrCore
> is very kludgy and involves a lot of special casees.
> For objects initialized _before_ the SolrCore goes "live",
> {{SolrResourceLoader}} tracks these instances internally, and calls
> {{inform()}} on all of them -- but for instances created _after_ the SolrCore
> is live (ex: schema pieces created via runtime REST calls),
> {{SolrResourceLoader}} does nothing to ensure they are later informed (and
> typically can't because that must happen after whatever type specific 'init'
> logic takes place). So there is a lot of special case handling to call
> {{inform}} methods sprinkled through out he code
> This issue serves as a refrence point to track/link various comments on the
> situation, and to cite in comments warning developers about how finicky it is
> to muck with the list of SolrCoreAware & ResourceLoaderAware allowed
> implementations.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]