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

Sharding balancer moves chunks to shards whose utilization is above the cluster average

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.4.0-rc1
    • Affects Version/s: 3.4.0-rc0
    • Component/s: Sharding
    • Fully Compatible
    • ALL
    • Sharding 2016-10-31

      The current sharding balancer policy attempts to move chunks from shards which have more than the cluster-wide per-shard chunk count average to shards which have less than it. However there is a bug due to which chunks will move from highly loaded to less-loaded shard if the difference between the two is sufficiently large.

      In particular consider the following case:

      Shard1 - 1000
      Shard2 - 900
      Shard3 - 900
      Shard4 - 800
      Shard5 - 0
      Shard6 - 0
      

      Intuitively, this should produce only two migrations: Shard1 -> Shard5 and Shard2 -> Shard 6. However it will also cause a third migration from Shard3 -> Shard4, because 900 is above the ideal per-shard chunk number of 600.

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

              Created:
              Updated:
              Resolved: