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

Allow unsharding a collection when all chunks are on the primary shard

    XMLWordPrintable

    Details

      Description

      Changing the shard key "on the fly" is pretty much impossible (see https://jira.mongodb.org/browse/SERVER-4000 ).
      A possible workaround could be to move all the chunks to the same shard (database's primary), unsharding the collection and then shard it again.
      But it's not currently possible to do so, we have to copy the source collection to another collection (and then drop the source/rename the target), but no changes must be happening to the source collection meanwhile or you would lose those changes.

      While not ideal, this could work for some use cases.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                14 Vote for this issue
                Watchers:
                19 Start watching this issue

                Dates

                • Created:
                  Updated: