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

Do not balance data between shards owning more than the ideal data size

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.2.1, 7.3.0-rc0, 6.0.13, 7.0.6
    • Affects Version/s: 6.0.3, 7.0.0, 7.2.0
    • Component/s: Sharding
    • Labels:
      None
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • v7.2, v7.0, v6.0
    • CAR Team 2023-12-25
    • 2

      The data size aware balancing introduced in v6.0.3+ versions can potentially schedule migrations between shards that are above the optimal data size threshold.

      The chunk-based balancing was avoiding that by only scheduling migrations to shards with a sufficiently low number of chunks.

      Example

      There are 400GB to spread across 4 shards (ideally 100GB per shard) currently distributed in the following way:

      • Shard0: 130GB
      • Shard1: 120GB
      • Shard2: 110GB
      • Shard3: 40GB
      Next balancing round (currently):
      • Shard0 donates to shard3
      • Shard1 donates to shard2 (this is the bug -> there is no real need to donate from shard1 to shard2 because they both need to reach 100GB)
      Expected next balancing round after fixing this:
      • Shard0 donates to shard3

      (Problem/solution very similar to SERVER-75481)

            Assignee:
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Reporter:
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: