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

SolrResourceLoader of an IndexSchema should only be used for building the schema stuff

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 8.1
    • Component/s: Schema and Analysis
    • Labels:
      None

      Description

      The IndexSchema has a SolrResourceLoader that's taken from a SolrConfig in its constructor.  If this IndexSchema gets re-used across Solr cores (via "shareSchema" being true in solr.xml), and if this resourceLoader is used in the future from a core that differs from the core the schema was created from, bad things can happen (like a memory leak in SolrResourceLoader.waitingForResources).  The resourceLoader here is only actually needed to help create the schema stuff, like analyzers.  Once it's done, it isn't needed anymore. However our Solr code base is using this in other places that are not appropriate.  It's a subtle problem as there's a confluence of circumstances that need to occur to trigger it.

        Attachments

        1. SOLR-13253.patch
          17 kB
          David Smiley

          Activity

            People

            • Assignee:
              dsmiley David Smiley
              Reporter:
              dsmiley David Smiley
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: