定義
abortReshardCollectionバージョン 5.0 の新機能。
During a resharding operation, you can abort the operation with the
abortReshardCollectioncommand.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
abortReshardCollectioncommand, the command returns an error.Tip
In
mongosh, this command can also be run through thesh.abortReshardCollection()helper method.Helper methods are convenient for
mongoshusers, but they may not return the same level of information as database commands. In cases where the convenience is not needed or the additional return fields are required, use the database command.
互換性
このコマンドは、次の環境でホストされている配置で使用できます。
- MongoDB Atlas: The fully managed service for MongoDB deployments in the cloud
注意
This command is supported in all MongoDB Atlas clusters. For information on Atlas support for all commands, see Unsupported Commands.
MongoDB Enterprise: サブスクリプションベースの自己管理型 MongoDB バージョン
MongoDB Community: ソースが利用可能で、無料で使用できる自己管理型の MongoDB のバージョン
構文
このコマンドの構文は、次のとおりです。
db.adminCommand( { abortReshardCollection: "<database>.<collection>" } )
例
リシャーディング操作の中止
次の例えでは、 sales.ordersコレクションで実行中の再シャーディング操作を中止します。
db.adminCommand({ abortReshardCollection: "sales.orders" })