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

SolrResourceLoader logging about "Solr home set to" is very missleading/broken in multicore

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.6, 4.0-ALPHA
    • None
    • None

    Description

      the SolrResourceLoader constructor has this bit of logging left over from the days before multicore...

          log.info("Solr home set to '" + this.instanceDir + "'");
      

      but this is confusing and missleading since there are N+1 SOlrResourceLoaders in a given solr instance (1 for the CoreContainer, and N for the N cores) and only one of them is refering to the true "Solr Home" dir, the others are refering to the instanceDir of the respective cores.

      For example, using the 3.5 example and running java -Dsolr.solr.home=multicore -jar start.jar you'll see...

      Mar 21, 2012 7:02:46 PM org.apache.solr.core.SolrResourceLoader locateSolrHome
      INFO: JNDI not configured for solr (NoInitialContextEx)
      Mar 21, 2012 7:02:46 PM org.apache.solr.core.SolrResourceLoader locateSolrHome
      INFO: using system property solr.solr.home: multicore
      Mar 21, 2012 7:02:46 PM org.apache.solr.core.SolrResourceLoader <init>
      INFO: Solr home set to 'multicore/'
      Mar 21, 2012 7:02:46 PM org.apache.solr.servlet.SolrDispatchFilter init
      INFO: SolrDispatchFilter.init()
      Mar 21, 2012 7:02:46 PM org.apache.solr.core.SolrResourceLoader locateSolrHome
      INFO: JNDI not configured for solr (NoInitialContextEx)
      Mar 21, 2012 7:02:46 PM org.apache.solr.core.SolrResourceLoader locateSolrHome
      INFO: using system property solr.solr.home: multicore
      Mar 21, 2012 7:02:46 PM org.apache.solr.core.CoreContainer$Initializer initialize
      INFO: looking for solr.xml: /home/hossman/lucene/lucene-3.5.0_tag/solr/example/multicore/solr.xml
      Mar 21, 2012 7:02:46 PM org.apache.solr.core.SolrResourceLoader locateSolrHome
      INFO: JNDI not configured for solr (NoInitialContextEx)
      Mar 21, 2012 7:02:46 PM org.apache.solr.core.SolrResourceLoader locateSolrHome
      INFO: using system property solr.solr.home: multicore
      Mar 21, 2012 7:02:46 PM org.apache.solr.core.CoreContainer <init>
      INFO: New CoreContainer: solrHome=multicore/ instance=108681753
      Mar 21, 2012 7:02:46 PM org.apache.solr.core.SolrResourceLoader <init>
      INFO: Solr home set to 'multicore/'
      Mar 21, 2012 7:02:46 PM org.apache.solr.core.SolrResourceLoader <init>
      INFO: Solr home set to 'multicore/core0/'
      
      ...lots of logs about initing core0...
      
      INFO: registering core: core0
      Mar 21, 2012 7:02:47 PM org.apache.solr.core.SolrCore registerSearcher
      INFO: [core0] Registered new searcher Searcher@5dde45e2 main
      Mar 21, 2012 7:02:47 PM org.apache.solr.core.SolrResourceLoader <init>
      INFO: Solr home set to 'multicore/core1/'
      Mar 21, 2012 7:02:47 PM org.apache.solr.core.SolrConfig <init>
      
      ...lots of logs about initing core1...
      
      Mar 21, 2012 7:02:47 PM org.apache.solr.core.CoreContainer register
      INFO: registering core: core1
      ...
      

      we should revamp/add some of the log messages from CoreContainer and SolrResourceLoader to make it more clear what the one true solr home is, and when SolrresourceLoader is being used for an instanceDir of a single core.

      Attachments

        1. SOLR-3264.patch
          5 kB
          Chris M. Hostetter

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: