AI エージェント向け: ドキュメントインデックスは https://www.mongodb.com/ja-jp/docs/llms.txt で利用できます。すべてのページの markdown バージョンは、いずれかの URL パスに .md を追加することで利用できます。
Docs Menu

abortRewriteCollection(データベースコマンド)

abortRewriteCollection

進行中の rewriteCollection 操作を停止します。

バージョン8.3の新機能。

このコマンドは、次の環境でホストされている配置で使用できます。

  • 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( {
abortRewriteCollection: "<database>.<collection>"
} )

このコマンドは、次のフィールドを使用します。

フィールド
タイプ
必要性
説明

abortRewriteCollection

string

必須

書き換えを停止するデータベースとコレクションを指定します。

abortRewriteCollection コマンドには、リ書込みを停止するクラスターまたはデータベースとコレクションに対する rewriteCollection 権限アクションが必要です。

この権限アクションは、次のロールを持つユーザーも使用できます。

次のコレクション書き換えの例について考えてみましょう。

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

この書き換えを停止するには、次のようにデータベースとコレクション名を abortRewriteCollection コマンドに渡します。

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