[ 
https://issues.apache.org/jira/browse/SOLR-11807?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Varun Thacker updated SOLR-11807:
---------------------------------
    Attachment: SOLR-11807.patch

> Restore collection should treat maxShardsPerNode=-1 as unlimited like create 
> collection
> ---------------------------------------------------------------------------------------
>
>                 Key: SOLR-11807
>                 URL: https://issues.apache.org/jira/browse/SOLR-11807
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Varun Thacker
>            Assignee: Varun Thacker
>            Priority: Major
>         Attachments: SOLR-11807.patch
>
>
> Today we can never restore the cloud example gettingstarted collection 
> because it sets maxShardsPerNode=-1 . We have special handling for -1 in 
> CreateCollectionCmd but not in RestoreCmd.
> Today RestoreCmd does has this check and it fails to restore the collection
> {code}
>     if ((numShards * totalReplicasPerShard) > (availableNodeCount * 
> maxShardsPerNode)) {
>       throw new SolrException(ErrorCode.BAD_REQUEST,
>           String.format(Locale.ROOT, "Solr cloud with available number of 
> nodes:%d is insufficient for"
>               + " restoring a collection with %d shards, total replicas per 
> shard %d and maxShardsPerNode %d."
>               + " Consider increasing maxShardsPerNode value OR number of 
> available nodes.",
>               availableNodeCount, numShards, totalReplicasPerShard, 
> maxShardsPerNode));
>     }
> {code}
> Steps to reproduce:
> Steps to reproduce:
> 1. ./bin/solr start -e cloud -noprompt : This creates a 2 node cluster and a 
> gettingstarted collection which 2X2
> 2. Added 4 docs (id=1,2,3,4) with commit=true and openSearcher=true (default)
> 3. Call backup: 
> http://localhost:8983/solr/admin/collections?action=BACKUP&name=gettingstarted_backup&collection=gettingstarted&location=/Users/varunthacker/solr-7.1.0
> 4. Call restore:
> http://localhost:8983/solr/admin/collections?action=restore&name=gettingstarted_backup&collection=restore_gettingstarted&location=/Users/varunthacker/solr-7.1.0



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to