Skip to content

DOCS-9807: adds docs for sh.enableAutoSplit and sh.disableAutoSplit #3243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions config/redirects
Original file line number Diff line number Diff line change
Expand Up @@ -1350,6 +1350,8 @@ raw: /master/release-notes/3.0-general-improvements -> ${base}/release-notes/3.0
[v3.6-*]: /${version}/core/document-validation -> ${base}/${version}/core/schema-validation
[*-v3.4]: /${version}/core/schema-validation -> ${base}/${version}/core/document-validation
[v3.6-*]: /${version}/reference/method/sh.getBalancerLockDetails -> ${base}/${version}/reference/method/js-sharding
[v3.4-*]: /${version}/reference/method/sh.disableAutoSplit -> ${base}/${version}/reference/program/mongos
[v3.4-*]: /${version}/reference/method/sh.enableAutoSplit -> ${base}/${version}/reference/program/mongos

[v3.6-*]: /${version}/core/data-modeling-json-schema -> ${base}/${version}/core/schema-validation
[v3.6-*]: /${version}/core/distributed-write-operations -> ${base}/${version}/core/distributed-queries
Expand Down
8 changes: 8 additions & 0 deletions source/includes/ref-toc-method-sh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ name: ":method:`sh.enableBalancing()`"
file: /reference/method/sh.enableBalancing
description: "Activates the sharded collection balancer process if previously disabled using :method:`sh.disableBalancing()`."
---
name: ":method:`sh.disableAutoSplit()`"
file: /reference/method/sh.disableAutoSplit
description: "Disables auto-splitting for the sharded cluster."
---
name: ":method:`sh.enableAutoSplit()`"
file: /reference/method/sh.enableAutoSplit
description: "Enables auto-splitting for the sharded cluster."
---
name: ":method:`sh.enableSharding()`"
file: /reference/method/sh.enableSharding
description: "Enables sharding on a specific database."
Expand Down
37 changes: 37 additions & 0 deletions source/reference/method/sh.disableAutoSplit.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
===================
sh.disableAutoSplit
===================

.. default-domain:: mongodb

.. contents:: On this page
:local:
:backlinks: none
:depth: 1
:class: singlecol

Description
-----------

.. method:: sh.disableAutoSplit()

.. versionadded:: 3.4

Disables the autosplit flag in the :data:`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 :ref:`sharding-chunk-splits`.

.. important::

You can only run :method:`sh.enableAutoSplit()` from a
:binary:`~bin.mongo` shell connected to a :binary:`~bin.mongos`
instance. :method:`sh.enableAutoSplit()` errors if run on a
:binary:`~bin.mongod` instance.

.. seealso::
- :doc:`/tutorial/manage-sharded-cluster-balancer`
- :ref:`sharding-balancing`.
37 changes: 37 additions & 0 deletions source/reference/method/sh.enableAutoSplit.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
==================
sh.enableAutoSplit
==================

.. default-domain:: mongodb

.. contents:: On this page
:local:
:backlinks: none
:depth: 1
:class: singlecol

Description
-----------

.. method:: sh.enableAutoSplit()

.. versionadded:: 3.4

Enables auto-splitting for the sharded cluster.
:method:`sh.enableAutoSplit()` enables the autosplit flag in the
:data:`config.settings` collection.

Auto-splitting is enabled by default.

.. important::

You can only run :method:`sh.enableAutoSplit()` from a
:binary:`~bin.mongo` shell connected to a :binary:`~bin.mongos`
instance. :method:`sh.enableBalancing()` errors if run on a
:binary:`~bin.mongod` instance.

For more information on chunk splits, see
:ref:`sharding-chunk-splits`. For more information about how MongoDB
balances chunks among shards, see:
:doc:`/tutorial/manage-sharded-cluster-balancer` and
:ref:`sharding-balancing`.