abortReshardCollection
定義
abortReshardCollection
バージョン 5.0 で追加
During a resharding operation, you can abort the operation with the
abortReshardCollection
command.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
abortReshardCollection
command, the command returns an error.Tip
mongosh
では、このコマンドはsh.abortReshardCollection()
ヘルパー メソッドを通じて実行することもできます。ヘルパー メソッドは
mongosh
ユーザーには便利ですが、データベースコマンドと同じレベルの情報は返されない可能性があります。 便宜上必要ない場合、または追加の戻りフィールドが必要な場合は、 データベースコマンドを使用します。
互換性
このコマンドは、次の環境でホストされている配置で使用できます。
MongoDB Atlas はクラウドでの MongoDB 配置のためのフルマネージド サービスです
注意
このコマンドは、すべての MongoDB Atlas クラスターでサポートされています。すべてのコマンドに対する Atlas のサポートについては、「サポートされていないコマンド」を参照してください。
MongoDB Enterprise: サブスクリプションベースの自己管理型 MongoDB バージョン
MongoDB Community: ソースが利用可能で、無料で使用できる自己管理型の MongoDB のバージョン
構文
このコマンドの構文は、次のとおりです。
db.adminCommand( { abortReshardCollection: "<database>.<collection>" } )
例
リシャーディング操作の中止
次の例えでは、 sales.orders
コレクションで実行中の再シャーディング操作を中止します。
db.adminCommand({ abortReshardCollection: "sales.orders" })
以下も参照してください。