定義
sh.disableMigrations(namespace)Disables migrations for the specified namespace of the sharded collection. The balancer does not migrate chunks for the collection you pass to
sh.disableMigrations()until migrations are re-enabled usingsh.enableMigrations(). For more information on chunk migrations, see Manage Sharded Cluster Balancer.重要
You can only run
sh.disableMigrations()on amongosinstance. If you runsh.enableMigrations()on amongodinstance, the method returns an error.The
sh.disableMigrations()method has the following parameter:Parameterタイプ説明namespacestring
コレクションの名前空間。
互換性
このメソッドは、次の環境でホストされている配置で使用できます。
MongoDB Enterprise: サブスクリプションベースの自己管理型 MongoDB バージョン
MongoDB Community: ソースが利用可能で、無料で使用できる自己管理型の MongoDB のバージョン
注意
移行ステータスを確認するには、sh.status() を使用します。これにより、各コレクションの allowMigrationsフィールドが表示されます。