[SERVER-26500] Balancer policy may use the same shard multiple times when draining or correcting zones Created: 06/Oct/16  Updated: 19/Nov/16  Resolved: 07/Oct/16

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 3.4.0-rc0
Fix Version/s: 3.4.0-rc1

Type: Bug Priority: Major - P3
Reporter: Kaloian Manassiev Assignee: Kaloian Manassiev
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2016-10-10, Sharding 2016-10-31
Participants:

 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



 Comments   
Comment by Githook User [ 08/Oct/16 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-26500 Increase the 'short' sleep between balancer rounds
Branch: master
https://github.com/mongodb/mongo/commit/9f496a34f46adec73ed6da49b869c169c2a70519

Comment by Githook User [ 07/Oct/16 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-26500 Balancer should not repeat shards when draining or correcting zones
Branch: master
https://github.com/mongodb/mongo/commit/d33fef7a92f827cbf84c0c5ed7b4c77e9139b64e

Generated at Thu Feb 08 04:12:20 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.