Definition
sh.getTransitionToDedicatedConfigServerStatus()Shows the status of the transition from an embedded config server to a dedicated config server.
New in version 9.0.
Important
mongosh Method
This page documents a
mongoshmethod. This is not the documentation for database commands or language-specific drivers, such as Node.js.For the database command, see the
getTransitionToDedicatedConfigServerStatuscommand.For MongoDB API drivers, refer to the language-specific MongoDB driver documentation.
Compatibility
This method is available in deployments hosted in the following environments:
MongoDB Enterprise: The subscription-based, self-managed version of MongoDB
MongoDB Community: The source-available, free-to-use, and self-managed version of MongoDB
Syntax
sh.getTransitionToDedicatedConfigServerStatus()
Output Fields
For output fields, see the getTransitionToDedicatedConfigServerStatus command.
Behavior
Access Requirements
If you have authorization enabled, you must have the clusterManager role or any role that includes the removeShard action.
Database Migration Requirements
If the embedded config server is also the primary of one of the cluster's databases, then you must manually move the databases to a new shard after migrating all data from the shard. See the movePrimary command and the Remove Shards from a Sharded Cluster for more information.
Collection Migration Requirements
If one of the unsharded collections is on the embedded config server, you must first migrate the collection to a different shard.
To migrate an unsharded collection, see the moveCollection command.
Example
The following example returns the draining status of the config shard during a transition to a dedicated config server:
sh.getTransitionToDedicatedConfigServerStatus()
{ "state" : "ongoing", "remaining" : { "chunks" : NumberLong(2), "collectionsToMove" : NumberLong(1), "dbs" : NumberLong(1), "jumboChunks" : NumberLong(0), "estimatedRemainingBytes" : NumberLong(18) }, "msg" : "draining ongoing", "dbsToMove" : [ "testDB" ], "note" : "you need to call moveCollection for collectionsToMove and afterwards movePrimary for the dbsToMove", "collectionsToMove" : [ "testDB.testCollUnsharded" ], "ok" : 1, "$clusterTime" : { "clusterTime" : Timestamp(1772210444, 27), "signature" : { "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="), "keyId" : NumberLong(0) } }, "operationTime" : Timestamp(1772210444, 27) }