New in version 5.0.
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
sh.abortReshardCollection()method, the method returns an error.
This page documents a
mongoshmethod. This is not the documentation for database commands or language-specific drivers, such as Node.js.
For the database command, see the
For MongoDB API drivers, refer to the language-specific MongoDB driver documentation.
For the legacy
mongoshell documentation, refer to the documentation for the corresponding MongoDB Server release:
sh.abortReshardCollection() method has the following syntax:
sh.abortReshardCollection( <namespace> )
sh.abortReshardCollection() method takes the following
The name of the collection to shard in the form
The following example aborts a running resharding operation on the