lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Miller (JIRA)" <>
Subject [jira] [Commented] (SOLR-9867) The schemaless example can not be started after being stopped.
Date Fri, 30 Dec 2016 23:07:58 GMT


Mark Miller commented on SOLR-9867:

Thanks for looking into this Varun.

I think this behavior was built into CoreContainer previously and must have been removed in
a refactoring. Now I see no code that actually waits for a core to load, just the methods
on CoreContainer for it.

So we can restore the expected behavior here and wait for the core to load rather than throw
an exception:

        if (core != null) {
          path = path.substring(idx);
        } else if (cores.isCoreLoading(corename)) { // extra mem barriers, so don't look at
this before trying to get core
          throw new SolrException(ErrorCode.SERVICE_UNAVAILABLE, "SolrCore is loading");
        } else {
          // the core may have just finished loading
          core = cores.getCore(corename);
          if (core != null) {
            path = path.substring(idx);

I think it now causes a loading exception to be thrown rather than waiting for the core to
load though.

> The schemaless example can not be started after being stopped.
> --------------------------------------------------------------
>                 Key: SOLR-9867
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Mark Miller
>             Fix For: master (7.0), 6.4
> I'm having trouble when I start up the schemaless example after shutting down.
> I first tracked this down to the fact that the run example tool is getting an error when
it tries to create the SolrCore (again, it already exists) and so it deletes the cores instance
dir which leads to tlog and index lock errors in Solr.
> The reason it seems to be trying to create the core when it already exists is that the
run example tool uses a core status call to check existence and because the core is loading,
we don't consider it as existing. I added a check to look for
> That seemed to let me start up, but my first requests failed because the core was still
loading. It appears CoreContainer#getCore  is supposed to be blocking so you don't have this
problem, but there must be an issue, because it is not blocking.

This message was sent by Atlassian JIRA

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

View raw message