定義
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>" } )
コマンドフィールド
このコマンドは、次のフィールドを使用します。
フィールド | タイプ | 必要性 | 説明 |
|---|---|---|---|
| string | 必須 | 書き換えを停止するデータベースとコレクションを指定します。 |
アクセス制御
abortRewriteCollection コマンドには、リ書込みを停止するクラスターまたはデータベースとコレクションに対する rewriteCollection 権限アクションが必要です。
この権限アクションは、次のロールを持つユーザーも使用できます。
例
次のコレクション書き換えの例について考えてみましょう。
db.adminCommand( { rewriteCollection: "sales.orders" } )
この書き換えを停止するには、次のようにデータベースとコレクション名を abortRewriteCollection コマンドに渡します。
db.adminCommand( { abortRewriteCollection: "sales.orders" } )