@@ -8,7 +8,7 @@ moveChunk
8
8
9
9
:dbcommand:`moveChunk` is an internal command that moves
10
10
:term:`chunks <chunk>` between :term:`shards <shard>`. The command
11
- uses the following syntax :
11
+ has the following prototype form :
12
12
13
13
.. code-block:: javascript
14
14
@@ -17,40 +17,44 @@ moveChunk
17
17
to : <destination>,
18
18
<options> } )
19
19
20
- :param moveChunk: the name of the :term:`collection` which the :term:`chunk`
21
- exists. The collection's full namespace must be given, including
22
- the database name, for example: ``"test.blog.posts"``
20
+ :param command moveChunk: The name of the :term:`collection` which
21
+ the :term:`chunk` exists. The
22
+ collection's full namespace must be
23
+ given, including the database name, for
24
+ example: ``"test.blog.posts"``.
23
25
24
- :param find: a query expression that specifies a document of the chunk
25
- to be moved, for example: ``{ author: "eliot" }``
26
+ :param find: A query expression that specifies a document of the
27
+ chunk to be moved, for example: ``{ author: "eliot"
28
+ }``. The query does not have to be related to the
29
+ :term:`shard key`.
26
30
27
- :param to: the shard ID where the chunk will be moved to, for
28
- example: ``"shard1"``
31
+ :param to: The shard ID where the chunk will be moved to, for
32
+ example: ``"shard1"``.
29
33
34
+ :param _secondaryThrottle: Optional. Set to ``false`` by
35
+ default. Provides :ref:`write concern
36
+ <write-concern>` support for chunk
37
+ migrations.
30
38
31
- :option _secondaryThrottle: Set to ``false`` by default. Provides
32
- :ref:`write concern <write-concern>` support for chunk
33
- migrations.
34
-
35
- If ``_secondaryThrottle`` is set to ``true``, during chunk
36
- migrations when a :term:`shard` hosted by a :term:`replica set`,
37
- the :program:`mongod` will wait until the :term:`secondary`
38
- members replicate the migration operations continuing to migrate
39
- chunk data. In the balancer configuration, the ``replThrottle``
40
- configuration provides ``_secondaryThrottle`` behavior.
39
+ If ``_secondaryThrottle`` is set to ``true``, during chunk
40
+ migrations when a :term:`shard` hosted by a :term:`replica set`,
41
+ the :program:`mongod` will wait until the :term:`secondary` members
42
+ replicate the migration operations continuing to migrate chunk
43
+ data. In the balancer configuration, the ``replThrottle``
44
+ configuration provides ``_secondaryThrottle`` behavior.
41
45
42
46
Use the :method:`sh.moveChunk()` helper in the :program:`mongo`
43
- shell for manual chunk migrations .
47
+ shell to migrate chunks manually .
44
48
45
- For details on how chunks move within MongoDB see the :ref:`chunk
46
- migration <sharding-chunk-migration>` section .
49
+ The :ref:`chunk migration <sharding-chunk-migration>` section
50
+ describes how chunks move between shards on MongoDB .
47
51
48
- :dbcommand:`moveChunk` will return the following ``errmsg`` if the
49
- :term:` chunk` to be moved is in use by another :term:`cursor`:
52
+ :dbcommand:`moveChunk` will return the following if the
53
+ chunk to be moved is in use by another :term:`cursor`:
50
54
51
55
.. code-block:: none
52
56
53
- The collection's metadata lock is already taken.
57
+ errmsg: " The collection's metadata lock is already taken."
54
58
55
59
These errors usually occur when there are too many open
56
60
:term:`cursors <cursor>` accessing the chunk you are migrating. You
@@ -59,9 +63,9 @@ moveChunk
59
63
60
64
.. note::
61
65
62
- This command should not be used except in special circumstances
66
+ The :dbcommand:`moveChunk` command should be used in special circumstances
63
67
such as preparing your :term:`shard cluster` for an initial
64
- ingest of data.
68
+ ingestion of data.
65
69
66
70
.. seealso:: ":ref:`Create chunk <sharding-administration-create-chunks>`"
67
71
0 commit comments