-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Catalog and Routing
-
Sharding EMEA 2023-05-01, Sharding EMEA 2023-05-15
-
2
TL;DR When looking for zone violation chunks, avoid the chunk traversal on a shard if that shard doesn't have any zone associated.
Currently, the balancer process looking for zone violation chunks works this way:
1. Loop over all shards
2. Loop over all chunks of that shard
3. Check if chunk zone matches any zone associated to that shard
In case of a shard not having any zone associated, the balancer will iterate through all the chunks of that shard anyway. This could be avoided by checking the size of stat.shardZones before starting the second loop.