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

Zones created by defragmentation_util.js must always align with chunks

    • Fully Compatible
    • ALL
    • v6.1, v6.0
    • Sharding EMEA 2022-10-17
    • 0

      In the situation in which createAndDistributeChunks creates one chunk > 0 (min: {key: 0}, max: {key: $maxKey}) and then createRandomZones attempts to make 1 zone, the created zone will not line up with a chunk (the zone created will have bounds 0 --> 1000.

      This can cause the defragmenter to merge over zones in the first phase which can lead to a less than optimal result by the end of defragmentation. This is fine in production, because the defragmenter will just be a little less than optimal if zones aren't respected at the start of defragmentation, but it can cause test failures when there are only 3 chunks created and 1 zone.

      In order to prevent test failures, we should modify the behaviour of the defragmentation util to make sure that the zone we create always lines up with an existing chunk.

            Assignee:
            allison.easton@mongodb.com Allison Easton
            Reporter:
            allison.easton@mongodb.com Allison Easton
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: