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

Avoid traversing routing table in balancer split chunk policy

    • Fully Compatible
    • ALL
    • v7.1, v7.0, v6.0, v5.0, v4.4, v4.2
    • Sharding EMEA 2023-09-04

      The balancer,  in every balancing round, check if there are chunks that need to be split to enforce zone boundaries. This means that for every collection we call createCollectionDistributionStatus , this function is very expensive because it build an in-memory representation of all the chunks and tags for the collection. Thus it is linear in the size of the routing table plus the number of tags.

      To enforce zones boundaries, actually there is no need to build the in-memory representation of the routing table, thus we could simply skip that and build only the zone map.

            Assignee:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Reporter:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: