-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 7.0.0-rc0, 6.0.6, 6.3.0-rc2
-
Component/s: Sharding
-
Fully Compatible
-
ALL
-
v6.3, v6.0
-
Sharding EMEA 2023-04-17
The data size aware balancing introduced in v6.0.3+ versions can potentially schedule migrations from shards under the optimal data size threshold.
The chunk-based balancing was avoiding that by scheduling migrations only from shards with a sufficiently high number of chunks .
Example
There are 500GB to spread across 5 shards (100GB per shard) currently distributed in the following way:
- Shard0: 200GB
- Shard1: 200GB
- Shard2: 50GB
- Shard3: 40GB
- Shard4: 10GB
- Shard5: 0GB
Next balancing round (currently):
- Shard0 donates to shard5
- Shard1 donates to shard4
- Shard2 donates to shard3 (this is the bug -> there is no real need to donate from shard2 to shard3 because they both need to reach 100GB)
Next balancing round (after this fix):
- Shard0 donates to shard5
- Shard1 donates to shard4
- is caused by
-
SERVER-65816 Change balancer policy to balance on data size rather than number of chunks
- Closed