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

Chunk cloner must never consider `too big` a chunk with only one document

    • Fully Compatible
    • ALL
    • v6.0, v5.3, v5.0, v4.4
    • Sharding EMEA 2022-05-02

      The MigrationChunkClonerSourceLegacy is using the average object size to estimate how many objects a full chunk would be able to contain. However, the current semantic is disallowing moving chunks containing exactly one document whose size is greater than collection's max chunk size.

      Trivial scenario to reproduce the bug:

      • Set the default chunk size to 1MB
      • Create a collection with 100 chunks each containing one documents of 1.1 MB
      • Balancing will never happen because maxRecsWhenFull will be set to zero so it's not even possible to pad some slack

            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            pierlauro.sciarelli@mongodb.com Pierlauro Sciarelli
            0 Vote for this issue
            3 Start watching this issue