Skip to content

Commit 77bdbce

Browse files
author
Andrew Leung
committed
adding in info from moving chunks wiki - DOCS-306
1 parent df0cd11 commit 77bdbce

File tree

3 files changed

+38
-8
lines changed

3 files changed

+38
-8
lines changed

source/administration/sharding.txt

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,17 @@ However, you may want to migrate chunks manually in a few cases:
548548
- If the balancer in an active cluster cannot distribute chunks within
549549
the balancing window, then you will have to migrate chunks manually.
550550

551-
To migrate chunks, use the :dbcommand:`moveChunk` command.
551+
To migrate chunks, use the :dbcommand:`moveChunk` command.
552+
553+
.. note::
554+
555+
To return a list of shards, use the :dbcommand:`listshards`
556+
command.
557+
558+
Specify shard names using the :dbcommand:`addShard` command
559+
using the ``name`` argument. If you do not specify a name in the
560+
:dbcommand:`addShard` command, MongoDB will assign a name
561+
automatically.
552562

553563
The following example assumes that the field ``username`` is the
554564
:term:`shard key` for a collection named ``users`` in the ``myapp``
@@ -572,15 +582,17 @@ block until the migration is complete.
572582
:term:`secondary` members have replicated operations before allowing
573583
new chunk migrations.
574584

575-
.. note::
585+
.. warning::
576586

577-
To return a list of shards, use the :dbcommand:`listshards`
578-
command.
587+
The :dbcommand:`moveChunk` command may produce an error message:
579588

580-
Specify shard names using the :dbcommand:`addShard` command
581-
using the ``name`` argument. If you do not specify a name in the
582-
:dbcommand:`addShard` command, MongoDB will assign a name
583-
automatically.
589+
.. code-block:: none
590+
591+
The collection's metadata lock is already taken.
592+
593+
when there are open :term:`cursors <cursor>` accessing the chunk to
594+
be moved. To fix this situation, either wait until the cursors
595+
complete their operation or remove the cursors.
584596

585597
.. index:: balancing; operations
586598
.. _sharding-balancing-operations:

source/faq/sharding.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,3 +331,15 @@ the hash of a key with an ascending value. While you can compute a
331331
hashed value in your application and include this value in your
332332
documents for use as a shard key, the :issue:`SERVER-2001` issue will
333333
implement this capability within MongoDB.
334+
335+
What does "ERROR: moveChunk commit failed: version is at X|Y instead of A|B" and "ERROR: TERMINATING" mean? What happened?
336+
--------------------------------------------------------------------------------------------------------------------------
337+
338+
During a :ref:`chunk migration <sharding-chunk-migration>`, the
339+
:term:`shard` could not connect to the :term:`config database` to update
340+
chunk information. If the shard cannot update the config database
341+
after :dbcommand:`moveChunk`, the shard cluster will have an
342+
inconsistent view of all chunks. For this situation, the shard will
343+
terminate itself to prevent data inconsistency and produce this error.
344+
345+
Please contact MongoDB support directly for help in resolving this situation.

source/reference/glossary.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -836,3 +836,9 @@ Glossary
836836
availability, and partition tolerance, a distributed computing
837837
system can provide any two of these features, but never all
838838
three.
839+
840+
cursor
841+
In MongoDB, a cursor is a pointer to the result set of a
842+
:term:`query`, that can be iterated through to retrieve
843+
results. By default, cursors will timeout after 10 minutes of
844+
inactivity.

0 commit comments

Comments
 (0)