Details
-
Improvement
-
Resolution: Done
-
Minor - P4
-
None
-
None
-
None
Description
The removeShard documentation (and possibly other related pages) should note that only one shard in a cluster can be in "draining" state at a given time.
This is what happens if one tries to remove more than one shard in a cluster:
mongos> db.runCommand({removeShard: "shard01"})
|
{
|
"msg" : "draining started successfully",
|
"state" : "started",
|
"shard" : "shard01",
|
"note" : "you need to drop or movePrimary these databases",
|
"dbsToMove" : [
|
"test"
|
],
|
"ok" : 1
|
}
|
mongos> db.runCommand({removeShard: "shard02"})
|
{
|
"ok" : 0,
|
"errmsg" : "Can't have more than one draining shard at a time",
|
"code" : 117
|
}
|