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

ChunkManager::getShardIdsForRange invariants when max = MaxKey

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Sharding 2018-09-10
    • Linked BF Score:
      2

      Description

      The ChunkManager::getShardIdsForRange call contains an invariant to ensure that the range it is passed is contained within the shard key space for the collection.

      However, this invariant is incorrect when the range ends in MaxKey, because MaxKey is not a valid key value. The invariant should be extended to account for MaxKey and as part of fixing this we should write unit-tests to validate this logic.

      This bug does not exist in versions 4.0 and later, because we use a different structure for the chunk ranges.

        Attachments

          Activity

            People

            Assignee:
            kaloian.manassiev Kaloian Manassiev
            Reporter:
            kaloian.manassiev Kaloian Manassiev
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: