Docs Home → Develop Applications → MongoDB Manual
abortReshardCollection![](/docs/v5.3/assets/link.svg)
On this page
This version of the documentation is archived and no longer supported. View the current documentation to learn how to upgrade your version of MongoDB server.
Definition![](/docs/v5.3/assets/link.svg)
abortReshardCollection
New in version 5.0.
During a resharding operation, you can abort the operation with the
abortReshardCollection
command.The command has the following syntax:
{ abortReshardCollection: "<database>.<collection>" } 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.The
mongosh
provides a wrapper methodsh.abortReshardCollection()
.
Example![](/docs/v5.3/assets/link.svg)
Abort a Resharding Operation![](/docs/v5.3/assets/link.svg)
The following example aborts a running resharding operation on the sales.orders
collection:
db.adminCommand({ abortReshardCollection: "sales.orders" })