Varun Thacker created SOLR-11546:
------------------------------------

             Summary: Improve error response from collection api calls
                 Key: SOLR-11546
                 URL: https://issues.apache.org/jira/browse/SOLR-11546
             Project: Solr
          Issue Type: Bug
      Security Level: Public (Default Security Level. Issues are Public)
            Reporter: Varun Thacker


I ran this API call : 
{{http://localhost:8983/solr/admin/collections?action=CREATE&name=test_tlog&numShards=2&tlogReplicas=2}}
 and forgot to add maxShardsPerNode . The response looks overly verbose and 
repetitive 


{code}
{
  "responseHeader":{
    "status":400,
    "QTime":242},
  "Operation create caused 
exception:":"org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:
 Cannot create collection test_tlog. Value of maxShardsPerNode is 1, and the 
number of nodes currently live or live and part of your createNodeSet is 2. 
This allows a maximum of 2 to be created. Value of numShards is 2, value of 
nrtReplicas is 0, value of tlogReplicas is 2 and value of pullReplicas is 0. 
This requires 4 shards to be created (higher than the allowed number)",
  "exception":{
    "msg":"Cannot create collection test_tlog. Value of maxShardsPerNode is 1, 
and the number of nodes currently live or live and part of your createNodeSet 
is 2. This allows a maximum of 2 to be created. Value of numShards is 2, value 
of nrtReplicas is 0, value of tlogReplicas is 2 and value of pullReplicas is 0. 
This requires 4 shards to be created (higher than the allowed number)",
    "rspCode":400},
  "error":{
    "metadata":[
      "error-class","org.apache.solr.common.SolrException",
      "root-error-class","org.apache.solr.common.SolrException"],
    "msg":"Cannot create collection test_tlog. Value of maxShardsPerNode is 1, 
and the number of nodes currently live or live and part of your createNodeSet 
is 2. This allows a maximum of 2 to be created. Value of numShards is 2, value 
of nrtReplicas is 0, value of tlogReplicas is 2 and value of pullReplicas is 0. 
This requires 4 shards to be created (higher than the allowed number)",
    "code":400}}
{code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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

Reply via email to