sh.disableAutoMerger()
On this page本页内容
Definition定义
sh.disableAutoMerger(namespace)
New in version 7.0. 7.0版新增。
Disables automatic chunk merges for a namespace.禁用命名空间的自动块合并。
sh.disableAutoMerger() is a 是一个mongosh helper method. mongosh辅助方法。It is effectively the same as running the 这实际上与在enableAutoMerger字段设置为configureCollectionBalancing command with the enableAutoMerger field set to false.false的情况下运行configureCollectionBalancing命令相同。
mongosh Method
This page documents a mongosh method. This is not the documentation for database commands or language-specific drivers, such as Node.js.
For the database command, see the configureCollectionBalancing command.
For MongoDB API drivers, refer to the language-specific MongoDB driver documentation.
For the legacy mongo shell documentation, refer to the documentation for the corresponding MongoDB Server release:
Syntax语法
sh.disableAutoMerger( <namespace> )
Method Field方法字段
The method takes the following field:该方法采用以下字段:
namespace | String | "<database>.<collection>". "<database>.<collection>"。 |
Behavior行为
When the method runs, it stops the AutoMerger. Any in progress operations issued by the AutoMerger are completed.当该方法运行时,它将停止AutoMerger。AutoMerger发布的任何正在进行的操作都已完成。
Example实例
The following example disables automatic chunk merges for 以下示例禁用"testDatabase.myCollection". "testDatabase.myCollection"的自动块合并。Run the example from 运行mongos:mongos中的示例:
sh.disableAutoMerger( "testDatabase.myCollection" )
Learn More了解更多信息
The AutoMerger自动合并sh.startAutoMerger()method方法sh.stopAutoMerger()method方法sh.enableAutoMerger()method方法
configureCollectionBalancingcommand命令mergeAllChunksOnShardcommand命令autoMergerIntervalSecsparameter参数autoMergerThrottlingMSparameter参数