[
https://issues.apache.org/jira/browse/SOLR-11476?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Erick Erickson resolved SOLR-11476.
-----------------------------------
Resolution: Won't Fix
Rule-based replica placement is deprecated. Starting with Solr 7, policy
placement is preferred, see the "Autoscaling Policy and Preferences" section of
the Solr Reference Guide.
> Solr seems to ignore replica placement rules
> --------------------------------------------
>
> Key: SOLR-11476
> URL: https://issues.apache.org/jira/browse/SOLR-11476
> Project: Solr
> Issue Type: Bug
> Components: v2 API
> Affects Versions: 6.6.1, 7.0, 7.0.1
> Reporter: Franz Wimmer
> Priority: Major
>
> I'm running Solr Cloud in OpenShift. I have set up 5 pods across the cluster,
> each running one solr node. The instances are managed by a ZooKeeper ensemble.
> In Solr 6.1, when I created a collection with 5 shards and a
> replicationFactor of 2, it would distribute all 10 replicas evenly on the
> nodes. With Solr 6.6 and 7.0, the distribution is random (why would I even
> want to gather many shards on one node and leave another node empty?).
> I tried using "Rule-based Replica Placement", but my rules seem to be
> ignored. I tried:
> {code}
> <solr-url>/solr/admin/collections?action=CREATE&name=wikipedia&numShards=5&maxShardsPerNode=2&replicationFactor=2&replica:<3,node:*&collection.configName=wikipedia
> <solr-url>/solr/admin/collections?action=CREATE&name=wikipedia&numShards=5&maxShardsPerNode=2&replicationFactor=2&shard:*,replica:1,node:*&collection.configName=wikipedia
> <solr-url>/solr/admin/collections?action=CREATE&name=wikipedia4&numShards=5&maxShardsPerNode=2&replicationFactor=2&replica:2,node:*&collection.configName=wikipedia
> {code}
> In all three cases, shards are distributed unevenly, often leaving one node
> completely empty.
> What seems odd is, when i try a replicationFactor of 1, it still doesn't
> work, but the API response is suggesting otherwise:
> {code}
> {
> "responseHeader":{
> "status":0,
> "QTime":3368},
> "success":{
> "solr-3.solr:8983_solr":{
> "responseHeader":{
> "status":0,
> "QTime":1836},
> "core":"wikipedia5_shard5_replica_n1"},
> "solr-2.solr:8983_solr":{
> "responseHeader":{
> "status":0,
> "QTime":1852},
> "core":"wikipedia5_shard4_replica_n1"},
> "solr-4.solr:8983_solr":{
> "responseHeader":{
> "status":0,
> "QTime":1859},
> "core":"wikipedia5_shard3_replica_n1"},
> "solr-0.solr:8983_solr":{
> "responseHeader":{
> "status":0,
> "QTime":1867},
> "core":"wikipedia5_shard2_replica_n1"},
> "solr-1.solr:8983_solr":{
> "responseHeader":{
> "status":0,
> "QTime":1872},
> "core":"wikipedia5_shard1_replica_n1"}}}
> {code}
> Other than the returned JSON, the collection looks like this:
> !https://i.imgur.com/UwqwQ5e.png!
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]