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

The moveChunk cmd doesn't remove the collection entry on the local catalog after donating the last chunk

    • Catalog and Routing
    • ALL

      The moveChunk command doesn't remove the collection entry from the local catalog after moving the last chunk to another shard.

      This can cause some problems specially when we remove a shard and afterwards we add it back (HELP-30325): the addShard command might fail because the shard that we are trying to add has a database that already exists on the sharded cluster. This DB shouldn't exist on the shard, because as part of the removeShard command we migrated all its data to other shards. However, since we didn't remove the collection entry after moving the last chunk,  the shard has a set of empty  (orphan?) collections that are visible through a listDatabases cmd.

            Assignee:
            Unassigned Unassigned
            Reporter:
            sergi.mateo-bellido@mongodb.com Sergi Mateo Bellido
            Votes:
            0 Vote for this issue
            Watchers:
            14 Start watching this issue

              Created:
              Updated: