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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.4.0-rc0
    • Fix Version/s: 3.4.0-rc1
    • Component/s: Sharding
    • Labels:
      None

      Description

      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
      

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: