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

Generate documents of exactly 1MB in autosplitter unit tests

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 5.1.0
    • 5.2.0, 5.1.0-rc1
    • Sharding
    • None
    • Fully Compatible
    • ALL
    • v5.1
    • Sharding EMEA 2021-10-18
    • 164

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: