ANNOUNCEMENT: Voyage AI joins MongoDB to power more accurate and trustworthy AI applications on Atlas.
Learn more
Docs Menu

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"
})

以下も参照してください。