[
https://issues.apache.org/jira/browse/SOLR-5970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16687447#comment-16687447
]
Jason Gerlowski commented on SOLR-5970:
---------------------------------------
bq. Until we fix the collections API properly, should we, at the least, throw a
non zero status upon a failed core creation for any replica?
+1.
Started taking a look at a possible fix for this earlier this afternoon. Few
notes from things:
First, I ran into two easy ways to reproduce the behavior on {{master}}. You
can use the invalid configset method that Ishan suggested above. That still
works great. Or, if you prefer, you can chmod Solr's data dir to be read only
({{chmod 444 solr/server/solr}}) and then create a collection however you'd
like.
Second, the overseer processing reports back an error message under the key
"failure" (you can see this in the curl response in Ishan's example above).
Naively, it seems like we could rely on this key as an indicator that the
request-processing failed, and that the status should be non-zero. I'll
probably go down that route tomorrow morning.
Lastly, and this is a bit of a side note, but I notice that when I reproduce
the problem, the create-collection call repeatedly takes upwards of 30 seconds.
I suspect this a secondary result of not noticing that the overseer processing
ran into an error - Solr thinks creation has succeeded so it waits 30 seconds
to see the collection become "active" (see the line
[here|https://github.com/apache/lucene-solr/blob/d799fd53c7cd3a83442d6010dc48802d2fd8c7fb/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java#L282]).
Hopefully a fix for the route cause here will also help us avoid this issue
too!
> Create collection API always has status 0
> -----------------------------------------
>
> Key: SOLR-5970
> URL: https://issues.apache.org/jira/browse/SOLR-5970
> Project: Solr
> Issue Type: Bug
> Reporter: Abraham Elmahrek
> Assignee: Jason Gerlowski
> Priority: Major
> Attachments: SOLR-5970-test.patch, bad.jar, schema.xml, solrconfig.xml
>
>
> The responses below are from a successful create collection API
> (https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-CreateormodifyanAliasforaCollection)
> call and an unsuccessful create collection API call. It seems the 'status'
> is always 0.
> Success:
> {u'responseHeader': {u'status': 0, u'QTime': 4421}, u'success': {u'':
> {u'core': u'test1_shard1_replica1', u'responseHeader': {u'status': 0,
> u'QTime': 3449}}}}
> Failure:
> {u'failure':
> {u'':
> u"org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException:Error
> CREATEing SolrCore 'test43_shard1_replica1': Unable to create core:
> test43_shard1_replica1 Caused by: Could not find configName for collection
> test43 found:[test1]"},
> u'responseHeader': {u'status': 0, u'QTime': 17149}
> }
> It seems like the status should be 400 or something similar for an
> unsuccessful attempt?
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]