Docs Menu

Docs HomeMongoDB Manual

sh.disableAutoSplit

On this page

  • Description
sh.disableAutoSplit()

New in version 3.4.

Disables the autosplit flag in the config.settings collection. When auto-splitting is enabled for a sharded cluster, MongoDB automatically splits chunks based on the shard key values the chunk represents to keep the chunks from growing too large.

Auto-splitting is enabled by default. For more information on chunk splits, see Chunk Splits.

You can only run sh.disableAutoSplit() from a mongo shell connected to a mongos instance. sh.disableAutoSplit() errors if run on a mongod instance.

Note

Starting in MongoDB 4.2, sh.stopBalancer() also disables auto-splitting for the sharded cluster.

Tip

See also:

←  sh.enableBalancing()sh.enableAutoSplit →

On this page

Share Feedback
© 2023 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2023 MongoDB, Inc.