lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Høydahl <jan....@cominvent.com>
Subject Re: Collection creation via CLI sets maxShardsPerNode as -1
Date Mon, 17 Sep 2018 20:29:28 GMT
There is already several JIRAs on this bug, see SOLR-11807 <https://issues.apache.org/jira/browse/SOLR-11807>,
SOLR-11823 <https://issues.apache.org/jira/browse/SOLR-11823>, SOLR-12489 <https://issues.apache.org/jira/browse/SOLR-12489>,
SOLR-11676 <https://issues.apache.org/jira/browse/SOLR-11676>, and should be fixed with
the upcoming 7.5 release.

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com

> 17. sep. 2018 kl. 22:25 skrev Edward Ribeiro <edward.ribeiro@gmail.com>:
> 
> Jeez, I should have posted this on user@ mailing list, sorry about that.
> 
> On Mon, Sep 17, 2018 at 4:35 PM, Edward Ribeiro <edward.ribeiro@gmail.com <mailto:edward.ribeiro@gmail.com>>
wrote:
> When using the CLI to create a collection on a single cloud node with the following command:
> 
> $ bin/solr create -c test -shards 1 -replicationFactor 1
> 
> It creates the collection with maxShardsPerNode as -1 as seen here: https://github.com/apache/lucene-solr/blob/c97f27b06c1d7c250e9596a9bc7bf5ca11ef6ad3/solr/core/src/java/org/apache/solr/util/SolrCLI.java#L1530-L1534
<https://github.com/apache/lucene-solr/blob/c97f27b06c1d7c250e9596a9bc7bf5ca11ef6ad3/solr/core/src/java/org/apache/solr/util/SolrCLI.java#L1530-L1534>
> 
> As we can see, it even allows the setting of maxShardsPerNode as a parameter, but according
to 7.4 documentation the default value would be 1 instead of -1 (see https://lucene.apache.org/solr/guide/7_4/collections-api.html
<https://lucene.apache.org/solr/guide/7_4/collections-api.html> ). If I create the collection
directly via HTTP request
> 
> curl -X POST 'http://localhost:8983/solr/admin/collections?action=CREATE&name=test2&numShards=1&replicationFactor=1
<http://localhost:8983/solr/admin/collections?action=CREATE&name=test2&numShards=1&replicationFactor=1>'
> 
> It creates the collection with the default maxShardsPerNode of 1.
> 
> It seems that the fix is trivial (either code or docs), but I would like to know if this
is really a bug or not, that is, should I provide a fix or leave it as-is?
> 
> PS: As a bit of context, I was bited by this when demo-ing Solr backup/restore capabilities
and it refused to recover a collection with maxShardsPerNode == -1.
> 
> Best regards,
> Edward
> 


Mime
View raw message