Sharding Methods
Note
For details on a specific method, including syntax and examples, click on the link to the method's reference page.
Name  | Description  | 
|---|---|
Checks the cluster or database for inconsistent sharding metadata. New in version 7.0.  | |
Checks the collection for inconsistent sharding metadata. New in version 7.0.  | |
Aborts a resharding operation. New in version 5.0.  | |
Adds a shard to a sharded cluster.  | |
This method aliases to   | |
Associates a shard to a zone. Supports configuring zones in sharded clusters.  | |
This method aliases to   | |
Returns information on whether the chunks of a sharded collection are balanced.  | |
Checks the cluster for inconsistent sharding metadata. New in version 7.0.  | |
Forces a resharding operation to block writes and complete. New in version 5.0.  | |
Disables automatic chunk merges for a namespace. New in version 7.0.  | |
Disable balancing on a single collection in a sharded database. Does not affect balancing of other collections in a sharded cluster.  | |
Enables automatic chunk merges for a namespace. New in version 7.0.  | |
Activates the sharded collection balancer process if previously disabled using   | |
Disables auto-splitting for the sharded cluster. Starting in MongoDB 6.0.3, automatic chunk splitting is not performed. This is because of balancing policy improvements. Auto-splitting commands still exist, but do not perform an operation.  | |
Enables auto-splitting for the sharded cluster. Starting in MongoDB 6.0.3, automatic chunk splitting is not performed. This is because of balancing policy improvements. Auto-splitting commands still exist, but do not perform an operation.  | |
Creates a database.  | |
Returns a boolean to report if the balancer is currently enabled.  | |
Returns data distribution information for sharded collections.
  | |
This method aliases to   | |
Removes an association between a range of shard keys and a zone. Supports configuring zones in sharded clusters.  | |
Returns help text for the   | |
Returns a document describing the status of the balancer.  | |
Migrates a chunk in a sharded cluster.  | |
Move ranges between shards.  | |
This method aliases to   | |
Removes the association between a shard and a zone. Use to manage zone sharding.  | |
Initiates a resharding operation to change the shard key for a collection, changing the distribution of your data. New in version 5.0.  | |
Enables sharding for a collection.  | |
Divides an existing chunk that contains a document matching a query into two approximately equal chunks.  | |
Enables the AutoMerger. New in version 7.0.  | |
Enables the balancer and waits for balancing to start.  | |
Reports on the status of a sharded cluster, as   | |
Disables the AutoMerger. New in version 7.0.  | |
Disables the balancer and waits for any in progress balancing rounds to complete.  | |
Internal. Waits for the balancer state to change.  | |
Internal. Waits until the balancer stops running.  | |
Internal. Waits for a change in ping state from one of the   | |
Associates a range of shard keys to a zone. Supports configuring zones in sharded clusters.  | |
Returns the hashed value for the input.  |