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 2 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 :ref:`create chunks <sharding-administration-create-chunks>` to
understand how to use :term:`pre-splitting` to 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
72 changes: 57 additions & 15 deletions source/reference/command/moveChunk.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,64 @@ 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
uses the following syntax:
Copy link
Contributor

Choose a reason for hiding this comment

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

the command doesn't really "use" a syntax, so much as

  • "have a prototype form"
  • "is invoked with a syntax."


.. code-block:: javascript

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

:param 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"``
Copy link
Contributor

Choose a reason for hiding this comment

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

this indentation pattern is novel and unlike any other occurrence in the manual. Why didn't you follow the indentation pattern used elsewhere? If that form doesn't have any rendering problems, we should continue to use it.


:param find: a query expression that specifies a document of the chunk
to be moved, for example: ``{ author: "eliot" }``

:param to: the shard ID where the chunk will be moved to, for
example: ``"shard1"``
Copy link
Contributor

Choose a reason for hiding this comment

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

These items all need to more closely resemble complete sentences, which means:

  • beginning with capital letters.
  • ending with periods.



:option _secondaryThrottle: 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`,
the :program:`mongod` will wait until the :term:`secondary` members
replicate the migration operations continuing to migrate chunk
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.
: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`,
the :program:`mongod` will wait until the :term:`secondary`
members replicate the migration operations continuing to migrate
chunk data. In the balancer configuration, the ``replThrottle``
configuration provides ``_secondaryThrottle`` behavior.

Use the :method:`sh.moveChunk()` helper in the :program:`mongo`
shell for manual chunk migrations.
Copy link
Contributor

Choose a reason for hiding this comment

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

 s/for.*$/to migrate chunks manually./


For details on how chunks move within MongoDB see the :ref:`chunk
migration <sharding-chunk-migration>` section.
Copy link
Contributor

Choose a reason for hiding this comment

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

within doesn't make sense in this context.

also "for details" is unclear.


:dbcommand:`moveChunk` will return the following ``errmsg`` if the
Copy link
Contributor

Choose a reason for hiding this comment

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

the use of errmsg in this context uses a literal term in a sentence, which is unclear and contra indicated in the docs style.

:term:`chunk` to be moved is in use by another :term:`cursor`:
Copy link
Contributor

Choose a reason for hiding this comment

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

over citing chunk.


.. code-block:: none

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::

This command should not be used except in special circumstances
such as preparing your :term:`shard cluster` for an initial
ingest 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