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

Concurrent movePrimary and removeShard can move database to a no-longer existent shard

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 6.0.4, 6.2.0-rc5, 6.3.0-rc0
    • None
    • None
    • Fully Compatible
    • ALL
    • v6.2, v6.0
    • Sharding EMEA 2022-11-14, Sharding EMEA 2022-11-28, Sharding EMEA 2022-12-12, Sharding EMEA 2022-12-26

    Description

      Consider the following interleaving:

      1. MovePrimary starts
      2. MovePrimary completes the cloning phase and is about to execute the commit phase.
      3. Concurrently, the user runs removeShard on the destination shard
      4. MovePrimary now commits the metadata change on the configsvr which writes the no-longer-existent destination shardId as the db primary for the moved database

      As a result, the moved database becomes inaccessible and data may be lost if the removed shard is destroyed.

      Attachments

        Issue Links

          Activity

            People

              antonio.fuschetto@mongodb.com Antonio Fuschetto
              jordi.serra-torrens@mongodb.com Jordi Serra Torrens
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: