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

Generate documents of exactly 1MB in autosplitter unit tests

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.2.0, 5.1.0-rc1
    • Affects Version/s: 5.1.0
    • Component/s: Sharding
    • None
    • Fully Compatible
    • ALL
    • v5.1
    • Sharding EMEA 2021-10-18
    • 164

      The 1MB field generated here plus the padding results in a document size slightly bigger than 1MB (1048600 bytes instead of 1047576). This can lead to errors in randomly generated test cases that are playing on autosplitter thresholds corner cases (e.g. maxChunkSize` 56MB and surplus 18MB).

      Changing the 1024 * 1024 with 1024 * 1023 seems to generate documents of exactly 1MB, allowing the unit tests to be always be correct.

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

              Created:
              Updated:
              Resolved: