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

Migration recovery should handle refined shard key

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.3.0, 5.2.1, 5.0.7
    • Affects Version/s: 5.0.0, 5.2.0, 5.1.0
    • Component/s: 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

      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.

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

              Created:
              Updated:
              Resolved: