Skip to content

DOCS-306 adding in line to link with Chunk Migration and Create Chunk section #182

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 3 commits into from
Sep 6, 2012
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
10 changes: 9 additions & 1 deletion source/administration/sharding.txt
Original file line number Diff line number Diff line change
Expand Up @@ -619,13 +619,17 @@ In most circumstances, you should let the automatic balancer
migrate :term:`chunks <chunk>` between :term:`shards <shard>`.
However, you may want to migrate chunks manually in a few cases:

- If you create chunks by presplitting the data in your collection,
- If you create chunks by :term:`pre-splitting` the data in your collection,
you will have to migrate chunks manually to distribute chunks
evenly across the shards.

- If the balancer in an active cluster cannot distribute chunks within
the balancing window, then you will have to migrate chunks manually.

See the :ref:`chunk migration <sharding-chunk-migration>` section to
understand the internal process of how :term:`chunks <chunk>` move
between :term:`shards <shard>`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only cross reference terms the first time that they appear in a section.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please resolve this.


To migrate chunks, use the :dbcommand:`moveChunk` command.

.. note::
Expand Down Expand Up @@ -654,6 +658,10 @@ This command moves the chunk that includes the shard key value "smith" to the
:term:`shard` named ``mongodb-shard3.example.net``. The command will
block until the migration is complete.

See the :ref:`create chunks <sharding-administration-create-chunks>` section
for an overview of how :term:`pre-splitting` can improve initial data
load on a :term:`shard cluster`.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These redirections don't make sense. One does not "see a text to understand."

There are patterns that we use throughout the documentation to signpost these cross-references rhetorically, that are both simple and light weight. Rewrite these as needed.

.. versionadded:: 2.2
:dbcommand:`moveChunk` command has the: ``_secondaryThrottle``
paramenter. When set to ``true``, MongoDB ensures that
Expand Down
2 changes: 1 addition & 1 deletion source/faq/sharding.txt
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ Consider the following error message:
ERROR: moveChunk commit failed: version is at <n>|<nn> instead of <N>|<NN>" and "ERROR: TERMINATING"

:program:`mongod` procudes this message if, during a :ref:`chunk
migration <sharding-chunk-migration>`, the term:`shard` could not
migration <sharding-chunk-migration>`, the :term:`shard` could not
connect to the :term:`config database` to update chunk information. If
the shard cannot update the config database after
:dbcommand:`moveChunk`, the shard cluster will have an inconsistent
Expand Down
62 changes: 54 additions & 8 deletions source/reference/command/moveChunk.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,35 @@ moveChunk

.. dbcommand:: moveChunk

:dbcommand:`moveChunk` is an internal command that supports the
sharding. Use the :method:`sh.moveChunk()` helper in the
:program:`mongo` shell for manual chunk migrations.
:dbcommand:`moveChunk` is an internal command that moves
:term:`chunks <chunk>` between :term:`shards <shard>`. The command
has the following prototype form:

:option _secondaryThrottle: Set to ``false`` by default. Provides
:ref:`write concern <write-concern>`
support for chunk migrations.
.. code-block:: javascript

db.runCommand( { moveChunk : <namespace> ,
find : <query> ,
to : <destination>,
<options> } )

:param command moveChunk: The name of the :term:`collection` which
the :term:`chunk` exists. The
collection's full namespace must be
given, including the database name, for
example: ``"test.blog.posts"``.

:param find: A query expression that specifies a document of the
chunk to be moved, for example: ``{ author: "eliot"
}``. The query does not have to be related to the
:term:`shard key`.

:param to: The shard ID where the chunk will be moved to, for
example: ``"shard1"``.

:param _secondaryThrottle: Optional. Set to ``false`` by
default. Provides :ref:`write concern
<write-concern>` support for chunk
migrations.

If ``_secondaryThrottle`` is set to ``true``, during chunk
migrations when a :term:`shard` hosted by a :term:`replica set`,
Expand All @@ -21,7 +43,31 @@ moveChunk
data. In the balancer configuration, the ``replThrottle``
configuration provides ``_secondaryThrottle`` behavior.

For details on chunk migrations see the :ref:`Chunk Migration
<sharding-chunk-migration>` section.
Use the :method:`sh.moveChunk()` helper in the :program:`mongo`
shell to migrate chunks manually.

The :ref:`chunk migration <sharding-chunk-migration>` section
describes how chunks move between shards on MongoDB.

:dbcommand:`moveChunk` will return the following if the
chunk to be moved is in use by another :term:`cursor`:

.. code-block:: none

errmsg: "The collection's metadata lock is already taken."

These errors usually occur when there are too many open
:term:`cursors <cursor>` accessing the chunk you are migrating. You
can either wait until the cursors complete their operation or close
the cursors manually.

.. note::

The :dbcommand:`moveChunk` command should be used in special circumstances
such as preparing your :term:`shard cluster` for an initial
ingestion of data.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ingestion.
  • "this command" should be moveChunk

.. seealso:: ":ref:`Create chunk <sharding-administration-create-chunks>`"


.. admin-only