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

Allow previously removed shards to be added again

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.4.5
    • Component/s: None
    • Labels:
      None
    • Catalog and Routing

      Currently it is not possible to invoke a removeShard command on a specific machine and add it again at a later time without removing the datafiles due to the following error :

      "errmsg" : "can't add shard localhost:27022 because a local database 'test' exists in another shard0000:localhost:27021"

      I understand mongo cannot simply remove the database from the removed shard for a variety of reasons but I think the validation step to determine if the shard to be added is "clean" can be improved. I would assume iterating over all partitioned = true database on the new shard and for each iterating on all sharded collections to check if they're empty should be as safe a check and would allow subsequent removeShard->addShard without further intervention.

            Assignee:
            backlog-server-catalog-and-routing [DO NOT USE] Backlog - Catalog and Routing
            Reporter:
            remonvv Remon van Vliet
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: