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

Defragmenter should cap chunk size estimation

    • Fully Compatible
    • ALL
    • v6.2, v6.1, v6.0
    • Sharding EMEA 2022-12-12, Sharding EMEA 2022-12-26, Sharding EMEA 2023-01-09, Sharding EMEA 2023-01-23
    • 170

      The defragmenter in phase1 ("MergeAndMesure") issue dataSize commands to the shard in order to estimate the size of the chunks.

      Phase2 use this estimation to:
       - ignore all the chunks bigger than a certain threshold
       - order and process all the remaining chunks from the smaller to the bigger.

      Since we need an estimation of the data size just for smaller chunks we can avoid calculating it  for the bigger ones (they will be ignored by phase 2 in any case).

      In order to so we could send the dataSize command with the maxSize parameter so that if the shard reach this limit it will stop scanning the index and will set the maxReached flag in the reply.

            Assignee:
            paolo.polato@mongodb.com Paolo Polato
            Reporter:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: