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

Solr fails to start if QueryElevationComponent config is missing

    XMLWordPrintableJSON

Details

    Description

      QueryElevationComponent tries to do preload some data if its config file does not exist:

              if (!exists){
                // preload the first data
                RefCounted<SolrIndexSearcher> searchHolder = null;
                try {
                  searchHolder = core.getNewestSearcher(false);
                  IndexReader reader = searchHolder.get().getReader();
                  getElevationMap( reader, core );
                } finally {
                  if (searchHolder != null) searchHolder.decref();
                }
              }
      

      This does not work though, as asking for the newest searcher causes a request to be submitted to Solr before its ready to handle it:

           [java] SEVERE: java.lang.NullPointerException
           [java] 	at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:173)
           [java] 	at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
           [java] 	at org.apache.solr.core.SolrCore.execute(SolrCore.java:1317)
           [java] 	at org.apache.solr.core.QuerySenderListener.newSearcher(QuerySenderListener.java:52)
           [java] 	at org.apache.solr.core.SolrCore$3.call(SolrCore.java:1147)
           [java] 	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
           [java] 	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      

      The SearchHandler has not yet been core informed (as the QueryElevationComponent causes this as its getting core informed right before the SearchHandler) and so its components arraylist is still null.

      Attachments

        1. SOLR-1730.patch
          10 kB
          Grant Ingersoll
        2. SOLR-1730.patch
          15 kB
          Grant Ingersoll

        Issue Links

          Activity

            People

              gsingers Grant Ingersoll
              markrmiller@gmail.com Mark Miller
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: