MongoDB.local SF, Jan 15: See the speaker lineup & ship your AI vision faster. Use WEB50 to save 50%
Find out more >
Docs Menu
Docs Home
/ /

abortRewriteCollection (database command)

abortRewriteCollection

Stops an in-progress rewriteCollection operation.

New in version 8.3.

This command is available in deployments hosted in the following environments:

  • MongoDB Atlas: The fully managed service for MongoDB deployments in the cloud

Note

This command is supported in all MongoDB Atlas clusters. For information on Atlas support for all commands, see Unsupported Commands.

db.adminCommand( {
abortRewriteCollection: "<database>.<collection>"
} )

The command takes the following field:

Field
Type
Necessity
Description

abortRewriteCollection

string

Required

Specifies the database and collection to stop rewriting.

Consider the following example of a collection rewrite:

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

To stop this rewrite, pass the database and collection name to the abortRewriteCollection command:

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

Back

abortReshardCollection

On this page