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

Migration recovery should handle refined shard key

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 5.0.0, 5.2.0, 5.1.0
    • 5.3.0, 5.2.1, 5.0.7
    • Sharding
    • None
    • Fully Compatible
    • ALL
    • v5.2, v5.0
    • Hide

      Attached repro patch

      Show
      Attached repro patch
    • Sharding EMEA 2021-11-29, Sharding EMEA 2021-12-13, Sharding EMEA 2021-12-27, Sharding EMEA 2022-01-10, Sharding EMEA 2022-01-24
    • 33

    Description

      If a refine shard key command finishes before this check in the migration recovery runs, this invariant will be triggered. The function findIntersectingChunk uses string comparisons to find the chunk that contains the key. However, the containsKey function uses BSONObj comparison. In the case where a refine shard key has run, the string comparison will return the correct chunk but the bsonobj comparison will fail because there is an extra field in the shard key.

      The migration recovery should either specifically handle refine shard key, or the comparisons in findIntersectingChunk and containsKey should be fixed to not return conflicting information.

      Attachments

        Issue Links

          Activity

            People

              allison.easton@mongodb.com Allison Easton
              allison.easton@mongodb.com Allison Easton
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: