Balancer should prioritize draining shards

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Cluster Scalability
    • Sharding EMEA 2022-11-14
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      The balancer randomly chooses collections to balance each round. Within these collections, we prioritize draining shards, but if the balancer chooses collections that are not present on the draining shard, the balancer will move chunks between other shards rather than drain those that are trying to be removed.

      This problem is exacerbated if the user is trying to remove more than half of their shards. A user signaled that the draining of empty chunks was slowed down by the balancer moving chunks between the 2 non-draining shards. This prevented any chunks being drained from the shards being dropped during that round because the only two receiving shards were already involved in a migration.

            Assignee:
            Unassigned
            Reporter:
            Allison Easton
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: