lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grant Ingersoll (Updated) (JIRA)" <>
Subject [jira] [Updated] (SOLR-1730) Solr fails to start if QueryElevationComponent config is missing
Date Wed, 07 Dec 2011 18:18:40 GMT


Grant Ingersoll updated SOLR-1730:

    Attachment: SOLR-1730.patch

This patch should fix the problem.  I did a couple of things:

1. Addressed the solrconfig issue Yonik raised (i.e. use a sys property)
2. I logged that the core can't be created.
3. If there is only 1 core being created, then this throws an exception up and out of Solr
to the container.  Based on the docs, it seems different containers will deal with this as
they see fit.  Jetty simply displays an error message.
4. I marked the exception coming out of QEC as not logged yet.
5. In the SolrCore initialization code, I changed from only catching IOException to catching
Throwable.  I also then release the latch and close down any resources the core has allocated
so far.  I had to release the latch in the catch block there otherwise the ExecutorService
can't shutdown because it is blocked on the latch.

I'm running full tests now.
> Solr fails to start if QueryElevationComponent config is missing
> ----------------------------------------------------------------
>                 Key: SOLR-1730
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>          Components: SearchComponents - other
>    Affects Versions: 1.4
>            Reporter: Mark Miller
>            Assignee: Grant Ingersoll
>              Labels: newdev
>             Fix For: 3.6, 4.0
>         Attachments: SOLR-1730.patch, SOLR-1730.patch
> QueryElevationComponent tries to do preload some data if its config file does not exist:
> {code}
>         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();
>           }
>         }
> {code}
> 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:
> {code}
>      [java] SEVERE: java.lang.NullPointerException
>      [java] 	at org.apache.solr.handler.component.SearchHandler.handleRequestBody(
>      [java] 	at org.apache.solr.handler.RequestHandlerBase.handleRequest(
>      [java] 	at org.apache.solr.core.SolrCore.execute(
>      [java] 	at org.apache.solr.core.QuerySenderListener.newSearcher(
>      [java] 	at org.apache.solr.core.SolrCore$
>      [java] 	at java.util.concurrent.FutureTask$Sync.innerRun(
>      [java] 	at
> {code}
> 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.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message