Docs Menu

Docs HomeMongoDB Manual

cleanupReshardCollection

On this page

  • Definition
  • Example
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.

The command has the following syntax:

{
cleanupReshardCollection: "<database>.<collection>"
}

The following example cleans up metadata of a failed resharding operation on the sales.orders collection:

db.adminCommand({
cleanupReshardCollection: "sales.orders"
})

Tip

See also:

←  cleanupOrphanedcommitReshardCollection →

On this page

Share Feedback
© 2022 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2022 MongoDB, Inc.