[SERVER-26579] Sharding balancer moves chunks to shards whose utilization is above the cluster average Created: 11/Oct/16  Updated: 02/Dec/16  Resolved: 14/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: DF
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
is documented by DOCS-9441 Docs for SERVER-26579: Sharding balan... Closed
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2016-10-31
Participants:

 Description   

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.



 Comments   
Comment by Kaloian Manassiev [ 14/Oct/16 ]

With this change, the balancer will now also attempt to move chunks out of shards whose max size setting is exceeded.

Comment by Githook User [ 14/Oct/16 ]

Author:

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

Message: SERVER-26579 Do not move chunks to shards with above optimal chunk count
Branch: master
https://github.com/mongodb/mongo/commit/5dbe9c097231652f8eee97a66e24d8c448a3f9a1

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