Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-8311

SolrCoreAware and ResourceLoaderAware lifecyel is fragile - particularly with objects that can be created after SolrCore is live

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              hossman Chris M. Hostetter
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: