[
https://issues.apache.org/jira/browse/SOLR-7172?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Erick Erickson updated SOLR-7172:
---------------------------------
Attachment: SOLR-7172.patch
I think this patch is ready. It does several things:
1> returns more appropriate error messages
2> calculates whether we should be able to create a replica when adding a shard
or replica correctly
3> adds a bunch of tests.
4> uses the same logic for allowing replicas to be added when node/nodeset is
specified on ADDREPLICA and CREATESHARD
I haven't run this through precommit or the full test suite yet, putting this
version up for people to look at if you want.
> addreplica API fails with incorrect error msg "cannot create collection"
> ------------------------------------------------------------------------
>
> Key: SOLR-7172
> URL: https://issues.apache.org/jira/browse/SOLR-7172
> Project: Solr
> Issue Type: Bug
> Components: SolrCloud
> Affects Versions: 4.10.3, 5.0
> Reporter: Shalin Shekhar Mangar
> Assignee: Erick Erickson
> Fix For: 5.2, Trunk
>
> Attachments: SOLR-7172.patch, SOLR-7172.patch
>
>
> Steps to reproduce:
> # Create 1 node solr cloud cluster
> # Create collection 'test' with
> numShards=1&replicationFactor=1&maxShardsPerNode=1
> # Call addreplica API:
> {code}
> http://localhost:8983/solr/admin/collections?action=addreplica&collection=test&shard=shard1&wt=json
>
> {code}
> API fails with the following response:
> {code}
> {
> responseHeader: {
> status: 400,
> QTime: 9
> },
> Operation ADDREPLICA caused exception::
> "org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:
> Cannot create collection test. No live Solr-instances",
> exception: {
> msg: "Cannot create collection test. No live Solr-instances",
> rspCode: 400
> },
> error: {
> msg: "Cannot create collection test. No live Solr-instances",
> code: 400
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]