[jira] [Created] (SOLR-11476) Solr seems to ignore replica placement rules

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (SOLR-11476) Solr seems to ignore replica placement rules

JIRA jira@apache.org
Franz Wimmer created SOLR-11476:
-----------------------------------

             Summary: Solr seems to ignore replica placement rules
                 Key: SOLR-11476
                 URL: https://issues.apache.org/jira/browse/SOLR-11476
             Project: Solr
          Issue Type: Bug
      Security Level: Public (Default Security Level. Issues are Public)
          Components: v2 API
    Affects Versions: 7.0.1, 7.0, 6.6.1
            Reporter: Franz Wimmer


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
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]