How to unshard a collection on mongoDB?
I have created a collection on mongodb that is sharded on the wrong key. I
want to drop my collection and rebuild it so that it is sharded on the
right key.
Unfortunately doing db.removeCollection('mycollection') removes the data
but not some metadata info.
db.printShardingStatus still shows the sharding info I wrongly used for
mycollection, and if I create the collection again I can't shard it with
the new good key because it says "already sharded".
Any solution ?
Thanks
Thomas
No comments:
Post a Comment