lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Khludnev (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-9867) The Solr examples can not always be started after being stopped due to race with loading core.
Date Thu, 27 Apr 2017 20:54:04 GMT

    [ https://issues.apache.org/jira/browse/SOLR-9867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15987650#comment-15987650
] 

Mikhail Khludnev commented on SOLR-9867:
----------------------------------------

I've added printing response on core status requests. Here is how race looks like
{code}
Solr is running on 8983 in standalone mode with status:
{
  "solr_home":"/Use..olr/example/techproducts/solr",
  "version":"7.0.0-SNAPSHOT eb1671c8f9a472a6ba6ff2516c55110574a64a96 - khludnevm - 2017-04-27
18:02:58",
  "startTime":"2017-04-27T15:09:24.404Z",
  "uptime":"0 days, 0 hours, 0 minutes, 9 seconds",
  "memory":"35.9 MB (%7.3) of 490.7 MB",
  "baseUrl":"http://localhost:8983/solr"}
{code}
here are status responses
{code}
http://localhost:8983/solr/admin/cores?action=STATUS&core=techproducts
{responseHeader={status=0, QTime=2}, initFailures={}, status={techproducts={}}}
http://localhost:8983/solr/admin/cores?action=STATUS&core=techproducts
{responseHeader={status=0, QTime=0}, initFailures={}, status={techproducts={}}}

Creating new core 'techproducts' using command:
http://localhost:8983/solr/admin/cores?action=CREATE&name=techproducts&instanceDir=techproducts

ERROR: Error CREATEing SolrCore 'techproducts': Unable to create core [techproducts] Caused
by: Lock held by this virtual machine: /Users/khludnevm/lucene-solr/solr/example/techproducts/solr/techproducts/data/index/write.lock
{code}
Here is how it looks like in logs, one core is loading, it responds on STATUS HttpSolrCall,
and recieves core create request from SolrCLI. 
{code}
INFO  - 2017-04-27 15:09:33.021; [   x:techproducts] org.apache.solr.schema.IndexSchema; [techproducts]
Schema name=example
INFO  - 2017-04-27 15:09:34.059; [   ] org.apache.solr.servlet.HttpSolrCall; [admin] webapp=null
path=/admin/info/system params={wt=json} status=0 QTime=103
INFO  - 2017-04-27 15:09:34.132; [   ] org.apache.solr.core.TransientSolrCoreCacheDefault;
Allocating transient cache for 2147483647 transient cores
INFO  - 2017-04-27 15:09:34.133; [   ] org.apache.solr.servlet.HttpSolrCall; [admin] webapp=null
path=/admin/cores params={core=techproducts&action=STATUS&wt=json} status=0 QTime=2
INFO  - 2017-04-27 15:09:34.202; [   x:techproducts] org.apache.solr.rest.RestManager$Registry;
Registered ManagedResource impl org.apache.solr.rest.schema.analysis.ManagedWordSetResource
INFO  - 2017-04-27 15:09:34.202; [   ] org.apache.solr.servlet.HttpSolrCall; [admin] webapp=null
path=/admin/info/system params={wt=json} status=0 QTime=61
INFO  - 2017-04-27 15:09:34.203; [   x:techproducts] org.apache.solr.rest.RestManager$Registry;
Registered ManagedResource impl org.apache.solr.rest.schema.analysis.ManagedSynonymFilterFa
INFO  - 2017-04-27 15:09:34.215; [   x:techproducts] org.apache.solr.schema.IndexSchema; Loaded
schema example/1.6 with uniqueid field id
INFO  - 2017-04-27 15:09:34.216; [   x:techproducts] org.apache.solr.rest.RestManager$Registry;
Added observer of type org.apache.solr.rest.schema.analysis.ManagedStopFilterFactory to exi
INFO  - 2017-04-27 15:09:34.216; [   x:techproducts] org.apache.solr.rest.RestManager$Registry;
Added observer of type org.apache.solr.rest.schema.analysis.ManagedSynonymFilterFactory to

INFO  - 2017-04-27 15:09:34.270; [   ] org.apache.solr.servlet.HttpSolrCall; [admin] webapp=null
path=/admin/info/system params={wt=json} status=0 QTime=57
INFO  - 2017-04-27 15:09:34.282; [   ] org.apache.solr.servlet.HttpSolrCall; [admin] webapp=null
path=/admin/cores params={core=techproducts&action=STATUS&wt=json} status=0 QTime=0
INFO  - 2017-04-27 15:09:34.287; [   ] org.apache.solr.handler.admin.CoreAdminOperation; core
create command name=techproducts&action=CREATE&instanceDir=techproducts&wt=json
INFO  - 2017-04-27 15:09:34.294; [   x:techproducts] org.apache.solr.core.CoreContainer; Creating
SolrCore 'techproducts' using configuration from instancedir /Users/khl
{code} 

> The Solr examples can not always be started after being stopped due to race with loading
core.
> ----------------------------------------------------------------------------------------------
>
>                 Key: SOLR-9867
>                 URL: https://issues.apache.org/jira/browse/SOLR-9867
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Mark Miller
>             Fix For: 6.6, master (7.0)
>
>         Attachments: SOLR-9867.patch, SOLR-9867.patch
>
>
> 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 core.properties.
> 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
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message