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

Check value of hidden maxChunkSizeBytes

    • Type: Icon: Bug Bug
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.4.15, 5.0.10, 4.2.22
    • Component/s: None

      In versions 4.2 - 5.0, there is a hidden parameter to the moveChunk command which can be used to specify the max chunk size to move. However, there are not any checks on what this value can be set to. This can cause problems if the value is set to NaN or a negative value. We should check that the passed in value is a positive number and throw invalid options otherwise.

      This parameter was removed in 5.3, so is not a problem on versions greater than this.

      Passing NaN can also result in different behavior depending on the architecture and version:

      x86

      v4.2 -> max chunk size set to 2^64 bytes and entering critical section during transfer mods not allowed

      v4.4 & 5.0 -> max chunk size set to -2^63 and max number of documents to transfer set to 2

      arm

      v4.2, 4.4, & 5.0 -> max chunk size set to the default

       

      So we should separately check that the value is a number and that it is not negative so that the behavior is consistent across architectures

            Assignee:
            backlog-server-sharding-emea [DO NOT USE] Backlog - Sharding EMEA
            Reporter:
            allison.easton@mongodb.com Allison Easton
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: