cleanupReshardCollection
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
cleanupReshardCollection
New in version 5.0.
The
cleanupReshardCollection
command cleans up metadata of a failed resharding operation. You only need to run this command if a primary failover occurred while you ran a resharding operation.
Syntax
The command has the following syntax:
db.adminCommand( { cleanupReshardCollection: "<database>.<collection>" } )
Example
Clean up a Failed Resharding Operation
The following example cleans up metadata of a failed resharding
operation on the sales.orders
collection:
db.adminCommand({ cleanupReshardCollection: "sales.orders" })