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

`movePrimary` can leave orphaned data when it aborts after cloning

    • Sharding
    • ALL
    • 27

      If a movePrimary command was able to clone the database but failed to complete (for example, because it stepped down), it will leave the database and the other collections in the original shard. Attempting to call the command again will do nothing because the primary database is now officially moved to the another shard, leaving the unsharded collections orphaned on the old primary shard.

      There's also another variant where it fails after it successfully clones, but before it updates config.databases. In this scenario, attempting to retry to command will result in the command attempting to call clone again, but fail with collection already exits.

            Assignee:
            backlog-server-sharding [DO NOT USE] Backlog - Sharding Team
            Reporter:
            randolph@mongodb.com Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: