定義
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
mongoshmethod. 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> )
Parameter
The sh.commitReshardCollection() method takes the following parameter:
Parameter | タイプ | 説明 |
|---|---|---|
文字列 |
|
例
リシャーディング操作のコミット
次のコマンドは、 sales.ordersにリシャーディング操作を強制し、書込みをブロックして完了します。
sh.commitReshardCollection("sales.orders")