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

Balancer policy may use the same shard multiple times when draining or correcting zones

    • 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
    • None
    • Fully Compatible
    • ALL
    • Sharding 2016-10-10, Sharding 2016-10-31

      The balancing loop for draining and zone correction should ensure that a shard which has been used as a destination once is not considered as a source as well, because this would result in one of the requests sent to that shard to fail.

      The manifestation of this bug is an invariant with the following message:

      2016-10-06T10:20:59.779-0400 I -        [main] Invariant failure usedShards.insert(stat.shardId).second src\mongo\db\s\balancer\balancer_policy.cpp 380
      2016-10-06T10:20:59.780-0400 I -        [main]
      
      ***aborting after invariant() failure
      
      ...
      
      2016-10-06T10:21:00.366-0400 I CONTROL  [main] ucrtbased.dll                                                                                        raise+0x468
      2016-10-06T10:21:00.366-0400 I CONTROL  [main] ucrtbased.dll                                                                                        abort+0x39
      2016-10-06T10:21:00.366-0400 I CONTROL  [main] balancer_test.exe  ...\src\mongo\util\assert_util.cpp(154)                                           mongo::invariantFailed+0x110
      2016-10-06T10:21:00.366-0400 I CONTROL  [main] balancer_test.exe  ...\src\mongo\db\s\balancer\balancer_policy.cpp(380)                              mongo::BalancerPolicy::balance+0xc0b
      

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

              Created:
              Updated:
              Resolved: