Solr
  1. Solr
  2. SOLR-5296

Creating a collection with implicit router adds shard ranges to each shard

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.5
    • Fix Version/s: 4.5.1, 4.6, 6.0
    • Component/s: SolrCloud
    • Labels:
      None

      Description

      Creating a collection with implicit router adds shard ranges to each shard.

      Using the Example A from SolrCloud wiki:

      http://localhost:8983/solr/admin/collections?action=CREATE&name=myimplicitcollection3&numShards=2&maxShardsPerNode=5&router.name=implicit&shards=s1,s2&replicationFactor=2

      The following clusterstate is created:

      "myimplicitcollection3":{
      "shards":{
      "s1":{
      "range":"80000000-ffffffff",
      "state":"active",
      "replicas":{
      "core_node1":

      Unknown macro: { "state"}

      ,
      "core_node3":

      Unknown macro: { "state"}

      }},
      "s2":{
      "range":"0-7fffffff",
      "state":"active",
      "replicas":{
      "core_node2":

      Unknown macro: { "state"}

      ,
      "core_node4":{
      "state":"active",
      "base_url":"http://192.168.1.5:7574/solr",
      "core":"myimplicitcollection3_s2_replica1",
      "node_name":"192.168.1.5:7574_solr",
      "leader":"true"}}}},
      "maxShardsPerNode":"5",
      "router":

      Unknown macro: {"name"}

      ,
      "replicationFactor":"2"}

      Collections with implicit router should not have shard ranges at all. Note that the createshard API does the right thing.

      1. SOLR-5296.patch
        2 kB
        Shalin Shekhar Mangar

        Activity

        Hide
        Shalin Shekhar Mangar added a comment -

        The Overseer.createCollection was looking up the router from the message using "router" instead of "router.name". This defaults to CompositeIdRouter and hence the slices are configured with a non-null range.

        Fix + test attached.

        Show
        Shalin Shekhar Mangar added a comment - The Overseer.createCollection was looking up the router from the message using "router" instead of "router.name". This defaults to CompositeIdRouter and hence the slices are configured with a non-null range. Fix + test attached.
        Hide
        ASF subversion and git services added a comment -

        Commit 1528440 from shalin@apache.org in branch 'dev/trunk'
        [ https://svn.apache.org/r1528440 ]

        SOLR-5296: Creating a collection with implicit router adds shard ranges to each shard

        Show
        ASF subversion and git services added a comment - Commit 1528440 from shalin@apache.org in branch 'dev/trunk' [ https://svn.apache.org/r1528440 ] SOLR-5296 : Creating a collection with implicit router adds shard ranges to each shard
        Hide
        ASF subversion and git services added a comment -

        Commit 1528441 from shalin@apache.org in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1528441 ]

        SOLR-5296: Creating a collection with implicit router adds shard ranges to each shard

        Show
        ASF subversion and git services added a comment - Commit 1528441 from shalin@apache.org in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1528441 ] SOLR-5296 : Creating a collection with implicit router adds shard ranges to each shard
        Hide
        ASF subversion and git services added a comment -

        Commit 1530861 from shalin@apache.org in branch 'dev/branches/lucene_solr_4_5'
        [ https://svn.apache.org/r1530861 ]

        SOLR-4590, SOLR-5295, SOLR-5296, SOLR-5263, SOLR-5297, SOLR-5301, SOLR-5255, SOLR-5305, SOLR-5314: Merging r1526616, r1528433, r1528441, r1528461, r1528488, r1529341, r1529434, r1529503, r1530268 from branch_4x

        Show
        ASF subversion and git services added a comment - Commit 1530861 from shalin@apache.org in branch 'dev/branches/lucene_solr_4_5' [ https://svn.apache.org/r1530861 ] SOLR-4590 , SOLR-5295 , SOLR-5296 , SOLR-5263 , SOLR-5297 , SOLR-5301 , SOLR-5255 , SOLR-5305 , SOLR-5314 : Merging r1526616, r1528433, r1528441, r1528461, r1528488, r1529341, r1529434, r1529503, r1530268 from branch_4x

          People

          • Assignee:
            Shalin Shekhar Mangar
            Reporter:
            Shalin Shekhar Mangar
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development