For AI agents: a documentation index is available at https://www.mongodb.com/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.
Docs Menu

sh.startAutoMerger() (mongosh method)

sh.startAutoMerger()

New in version 7.0. :

Enables the AutoMerger.

This method is available in deployments hosted in the following environments:

  • MongoDB Atlas: The fully managed service for MongoDB deployments in the cloud

Important

This command is not supported in M0 and Flex clusters. For more information, see Unsupported Commands.

sh.startAutoMerger()

To set the time intervals for automatic chunk merges, use these parameters:

Note

You can set these parameters on config servers only.

The following example enables the AutoMerger. Run the example from mongos:

sh.startAutoMerger()