[SERVER-71239] Balancer optimisation when looking for zone violation chunks Created: 10/Nov/22  Updated: 12/Dec/23

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Silvia Surroca Assignee: Backlog - Catalog and Routing
Resolution: Unresolved Votes: 0
Labels: 12/12, balancer-round-perf
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Catalog and Routing
Sprint: Sharding EMEA 2023-05-01, Sharding EMEA 2023-05-15
Participants:
Story Points: 2

 Description   

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.


Generated at Thu Feb 08 06:18:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.