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

Existing violations allow bypassing policy rules when adding new replicas

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 8.5, 8.6, 9.0
    • 8.6
    • AutoScaling
    • None

    Description

      Steps to reproduce:

      • start with an empty cluster policy.
      • create a collection with as many replicas as there are nodes.
      • add one more replica to any node. Now this node has two replicas, all other nodes have one. 
      • define the following cluster policy:
      { 'set-cluster-policy': [ {'replica': '<2', 'shard': '#ANY', 'node': '#ANY', 'strict': true} ] } 

      This automatically creates a violation because of the existing layout.

      • try adding one more replica. This should fail because no node satisfies the rules (there must be at most 1 replica per node). However, the command succeeds and adds replica to the node that already has 2 replicas, which clearly violates the policy and makes matters even worse.

       

      Attachments

        1. SOLR-14409.patch
          3 kB
          Andrzej Bialecki

        Issue Links

          Activity

            People

              noble.paul Noble Paul
              ab Andrzej Bialecki
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 10m
                  1h 10m