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

sh.commitReshardCollection()(mongoshメソッド)

sh.commitReshardCollection(namespace)

バージョン 5.0 の新機能。

リシャーディング操作中、MongoDB はリシャーディング操作を完了するための推定期間が2 秒を下回るまで、書込み (write) をブロックしません。

If the current estimate is above two seconds but the time frame is acceptable to you, you can finish resharding faster. The sh.commitReshardCollection() method blocks writes early and forces the resharding operation to complete.

重要

mongosh メソッド

This page documents a mongosh method. This is not the documentation for database commands or language-specific drivers, such as Node.js.

データベースコマンドについては、commitReshardCollection コマンドを参照してください。

MongoDB API ドライバーについては、各言語の「MongoDB ドライバーのドキュメント」を参照してください。

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

  • MongoDB Atlas はクラウドでの MongoDB 配置のための完全管理サービスです

重要

このコマンドは、M0 および Flex クラスターではサポートされていません。詳細については、サポートされていないコマンド を参照してください。

  • MongoDB Enterprise: サブスクリプションベースの自己管理型 MongoDB バージョン

  • MongoDB Community: ソースが利用可能で、無料で使用できる自己管理型の MongoDB のバージョン

The sh.commitReshardCollection() method has the following syntax:

sh.commitReshardCollection( <namespace> )

The sh.commitReshardCollection() method takes the following parameter:

Parameter
タイプ
説明

文字列

"<database>.<collection>"形式でのシャーディングするコレクションの名前。

次のコマンドは、 sales.ordersリシャーディング操作を強制し、書込みをブロックして完了します。

sh.commitReshardCollection("sales.orders")
このページを評価