Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-25965

Sharding balancer always bounces a single extra chunk if there are less than 20 chunks in total

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.3.14
    • Affects Version/s: 3.3.12
    • Component/s: Sharding
    • Labels:
      None
    • Fully Compatible
    • ALL
    • Sharding 2016-09-19
    • 0

      The logic in the sharding balancer policy uses an integer division in order to determine the optimal number of chunks per shard in a cluster. Because of this, the result gets rounded down, which makes the optimal number of chunks in a cluster with 3 chunks and 2 shards to be 1. Because of this, the balancer will move a chunk on each iteration and the cluster will never be deemed "balanced".

            Assignee:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Reporter:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: