Skip to content

DOCS-983 Warning required in Pre-Splitting Section - Existing Data #623

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 8, 2013
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
9 changes: 9 additions & 0 deletions source/includes/warning-splitting-chunks.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. warning::

Be careful when splitting chunks. When you shard a collection that
has existing data, MongoDB automatically creates chunks to evenly
spread the collection. Performing additional splits requires
knowledge of the resulting chunk sizes by numbers of documents and by
size. You do not want splits that cause some chunks to be much larger
than others. This leads to balancing based on count of chunks, not on
their size, which may cause extreme load/data-distribution problems.
8 changes: 3 additions & 5 deletions source/reference/command/split.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@ split
this command makes it possible for administrators to manually
create splits.

.. admonition:: In normal operation there is no need to manually split chunks
In most clusters, MongoDB will manage all chunk creation and
distribution operations without manual intervention.

The :term:`balancer` and other sharding infrastructure will
automatically create chunks in the course of normal
operations. See :doc:`/core/sharded-cluster-internals` for more
information.
.. include:: /includes/warning-splitting-chunks.rst

Consider the following example:

Expand Down
2 changes: 2 additions & 0 deletions source/reference/command/splitChunk.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ splitChunk
:method:`sh.splitFind()` and :method:`sh.splitAt()` functions in the
:program:`mongo` shell to access this functionality.

.. include:: /includes/warning-splitting-chunks.rst

.. admin-only.
10 changes: 7 additions & 3 deletions source/tutorial/manage-chunks-in-sharded-cluster.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ You may want to split chunks manually if:
values between ``300`` and ``400``, *but* all values of your shard
keys are between ``250`` and ``500`` are in a single chunk.

.. include:: /includes/warning-splitting-chunks.rst

Use :method:`sh.status()` to determine the current chunks ranges across
the cluster.

Expand Down Expand Up @@ -101,11 +103,13 @@ chunk splits.
Create Chunks (Pre-Splitting)
-----------------------------

Pre-splitting lets you preemptively split chunks in an empty collection
and is used *only* in certain situations.
In most situations a :term:`sharded cluster` will create and distribute
chunks automatically without user intervention. However, in a limited
number of use profiles, MongoDB cannot create enough chunks or
distribute data fast enough to support required throughput. Consider
the following scenarios:
distribute data fast enough to support required throughput.
For example, if:

- you must partition an existing data collection that resides on a
single shard.
Expand All @@ -123,7 +127,7 @@ the following scenarios:
Preemptively splitting chunks increases cluster throughput for these
operations, by reducing the overhead of migrating chunks that hold
data during the write operation. MongoDB only creates splits after an
insert operation, and can only migrate a single chunk at a time. Chunk
insert operation and can migrate only a single chunk at a time. Chunk
migrations are resource intensive and further complicated by large
write volume to the migrating chunk.

Expand Down