Docs Menu
Docs Home
MongoDB Manual
/ / /


On this page

  • Definition
  • Syntax
  • Example

New in version 5.0.

During a resharding operation, you can abort the operation with the abortReshardCollection command.

You can abort a resharding operation at any point until the commit phase. If the resharding operation has reached the commit phase before you run the abortReshardCollection command, the command returns an error.


In mongosh, this command can also be run through the sh.abortReshardCollection() helper method.

Helper methods are convenient for mongosh users, but they may not return the same level of information as database commands. In cases where the convenience is not needed or the additional return fields are required, use the database command.

The command has the following syntax:

abortReshardCollection: "<database>.<collection>"

The following example aborts a running resharding operation on the sales.orders collection:

abortReshardCollection: "sales.orders"


See also:

← Sharding Commands