Might be https://issues.apache.org/jira/browse/SOLR-13248

>From the upgrade notes 7.7:
SOLR-13248: The default replica placement strategy used in Solr has been
reverted to the 'legacy' policy used by Solr
 7.4 and previous versions. This is due to multiple bugs in the autoscaling
based replica placement strategy that was
 made default in Solr 7.5 which causes multiple replicas of the same shard
to be placed on the same node in addition
 to the maxShardsPerNode and createNodeSet parameters being ignored.
Although the default has changed, autoscaling
 will continue to be used if a cluster policy or preference is specified or
a collection level policy is in use.
 The default replica placement strategy can be changed to use autoscaling
again by setting a cluster property:
 curl -X POST -H 'Content-type:application/json' --data-binary '
 {
   "set-obj-property": {
     "defaults" : {
       "cluster": {
         "useLegacyReplicaAssignment":false
       }
     }
   }
 }' http://$SOLR_HOST:$SOLR_PORT/api/cluster

Kevin Risden


On Fri, Mar 8, 2019 at 3:04 PM levtannen <lev.tan...@usdoj.gov> wrote:

> Hi community,
> I have solr 7.6 running on three nodes with about 400 collections with one
> shard  and 3 replicas per collection. I want replicas to be spread between
> all 3 nodes so that for every collection I have one replica per collection
> on each node.
> I create collections via the SolrJ code.
>                              for (String collectionName:<list of collection
> Names>){
>                                 create =
> CollectionAdminRequest.createCollection(collectionName, source,
> 1, 3);
>                                 result = solrClient.request(create);
>                             }
> In solr 7.4 it worked fine, but in solr 7.6 created replicas are not spread
> equally between nodes. In some collections all 3 replicas are created just
> on one node, in some 2 replicas are created  in one node and 1 in another
> and some collections are created correctly: I replica per node.
> Could anyone  give me advice on why it happened and how to fix it?
>
> Thank you.
> Lev Tannen
>
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>

Reply via email to