-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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>`. | ||
|
||
To migrate chunks, use the :dbcommand:`moveChunk` command. | ||
|
||
.. note:: | ||
|
@@ -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`. | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the command doesn't really "use" a syntax, so much as
|
||
|
||
.. 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"`` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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"`` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These items all need to more closely resemble complete sentences, which means:
|
||
|
||
|
||
: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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
For details on how chunks move within MongoDB see the :ref:`chunk | ||
migration <sharding-chunk-migration>` section. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the use of |
||
:term:`chunk` to be moved is in use by another :term:`cursor`: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
.. seealso:: ":ref:`Create chunk <sharding-administration-create-chunks>`" | ||
|
||
|
||
.. admin-only |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please resolve this.