Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-71239

Balancer optimisation when looking for zone violation chunks

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            silvia.surroca@mongodb.com Silvia Surroca
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: