Solr
  1. Solr
  2. SOLR-5295

The createshard collection API creates maxShardsPerNode number of replicas if replicationFactor is not specified

    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

      As reported by Brett Hoerner on solr-user:
      http://www.mail-archive.com/solr-user@lucene.apache.org/msg89545.html

      It seems that changes in 4.5 collection configuration now require users to
      set a maxShardsPerNode (or it defaults to 1).

      Maybe this was the case before, but with the new CREATESHARD API it seems a
      very restrictive. I've just created a very simple test collection on 3
      machines where I set maxShardsPerNode at collection creation time to 1, and
      I made 3 shards. Everything is good.

      Now I want a 4th shard, it seems impossible to create because the cluster
      "knows" I should only have 1 shard per node. Yet my problem doesn't require
      more hardware, I just my new shard to exist on one of the existing servers.

      So I try again – I create a collection with 3 shards and set
      maxShardsPerNode to 1000 (just as a silly test). Everything is good.

      Now I add shard4 and it immediately tries to add 1000 replicas of shard4...

      1. SOLR-5295.patch
        5 kB
        Shalin Shekhar Mangar
      2. SOLR-5295.patch
        5 kB
        Shalin Shekhar Mangar

        Activity

        Hide
        Shalin Shekhar Mangar added a comment -

        Fix + test

        Show
        Shalin Shekhar Mangar added a comment - Fix + test
        Hide
        Shalin Shekhar Mangar added a comment -

        The right patch. I had forgotten to add the shards parameter in the createshard command.

        Show
        Shalin Shekhar Mangar added a comment - The right patch. I had forgotten to add the shards parameter in the createshard command.
        Hide
        ASF subversion and git services added a comment -

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

        SOLR-5295: The CREATESHARD collection API creates maxShardsPerNode number of replicas if replicationFactor is not specified

        Show
        ASF subversion and git services added a comment - Commit 1528426 from shalin@apache.org in branch 'dev/trunk' [ https://svn.apache.org/r1528426 ] SOLR-5295 : The CREATESHARD collection API creates maxShardsPerNode number of replicas if replicationFactor is not specified
        Hide
        ASF subversion and git services added a comment -

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

        SOLR-5295: The CREATESHARD collection API creates maxShardsPerNode number of replicas if replicationFactor is not specified

        Show
        ASF subversion and git services added a comment - Commit 1528433 from shalin@apache.org in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1528433 ] SOLR-5295 : The CREATESHARD collection API creates maxShardsPerNode number of replicas if replicationFactor is not specified
        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