Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-11005

inconsistency when maxShardsPerNode used along with policies

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: AutoScaling, SolrCloud
    • Labels:
      None

      Description

      The attribute maxShardsPerNode conflicts with the conditions in the new Policy framework

      for example , I can say maxShardsPerNode=5 and I can have a policy

      { replica:"<3" , shard: "#ANY", node:"#ANY"}
      

      So, it makes no sense to persist this attribute in collection state.json . Ideally, we would like to keep this as a part of the policy and policy only.

      proposed new behavior

      if the new policy framework is being used

      {maxShardsPerNode}

      should result in creating a new collection specific policy with the correct condition. for example, if a collection "x" is created with the parameter maxShardsPerNode=2 we will create a new policy in autoscaling.json

      {
      "policies":{
      "x_COLL_POLICY" : [{replica:"<3", shard:"#ANY" , node:"ANY"}]
      }
      }
      

      this policy will be referred to in the state.json. There will be no attribute called maxShardsPerNode persisted to the state.json.

      if there is already a policy being specified for the collection, solr should throw an error asking the user to edit the policy directly

      the name is bad

      We must rename the attribute maxShardsPerNode to maxReplicasPerNode. This should be a backward compatible change. The old name will continue to work and the API would give a friendly warning if the old name is used

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                noble.paul Noble Paul
                Reporter:
                noble.paul Noble Paul
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: