Skip to content

Commit 1458f9f

Browse files
committed
DOCS-5629 DOCS-5329 include archiveMovedChunks behavior in the chunk migration
1 parent 1ac3759 commit 1458f9f

File tree

5 files changed

+36
-5
lines changed

5 files changed

+36
-5
lines changed

source/core/sharding-balancing.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ To address uneven chunk distribution for a sharded collection, the
4545
balancer :doc:`migrates chunks </core/sharding-chunk-migration>` from
4646
shards with more chunks to shards with a fewer number of chunks. The
4747
balancer migrates the chunks, one at a time, until there is an even
48-
dispersion of chunks for the collection across the shards.
48+
dispersion of chunks for the collection across the shards. For details
49+
about chunk migration, see :ref:`chunk-migration-procedure`.
50+
51+
.. include:: /includes/fact-archiveMovedChunks.rst
4952

5053
Chunk migrations carry some overhead in terms of bandwidth and
5154
workload, both of which can impact database performance. The

source/core/sharding-chunk-migration.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ either:
3030
a sharded collection's chunks across the shards. See :ref:`Migration
3131
Thresholds <sharding-migration-thresholds>` for more details.
3232

33+
.. _chunk-migration-procedure:
34+
35+
Chunk Migration Procedure
36+
~~~~~~~~~~~~~~~~~~~~~~~~~
37+
3338
All chunk migrations use the following procedure:
3439

3540
#. The balancer process sends the :dbcommand:`moveChunk` command to
@@ -58,6 +63,11 @@ All chunk migrations use the following procedure:
5863
and once there are no open cursors on the chunk, the source shard
5964
deletes its copy of the documents.
6065

66+
.. versionchanged:: 2.6
67+
68+
The source shard automatically archives the migrated documents by
69+
default. For more information, see :ref:`moveChunk-directory`.
70+
6171
.. versionchanged:: 2.4
6272

6373
If the balancer needs to perform additional chunk migrations
@@ -133,6 +143,17 @@ the chunk migration have the following replication policy:
133143
Throttle in the v2.2 Manual
134144
</tutorial/configure-sharded-cluster-balancer/#sharded-cluster-config-secondary-throttle>`
135145

146+
.. _moveChunk-directory:
147+
148+
``moveChunk`` directory
149+
-----------------------
150+
151+
Starting in MongoDB 2.6, :setting:`sharding.archiveMovedChunks` is
152+
enabled by default. With :setting:`sharding.archiveMovedChunks`
153+
enabled, the source shard archives the documents in the migrated chunks
154+
in a directory named after the collection namespace under the
155+
``moveChunk`` directory in the :setting:`storage.dbPath`.
156+
136157
.. _jumbo-chunks:
137158

138159
Jumbo Chunks

source/includes/fact-adding-shards-changes-cluster-balance.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ When you add a shard to a sharded cluster, you affect the balance of
33
collections. The balancer will begin migrating chunks so that the
44
cluster will achieve balance. See :doc:`/core/sharding-balancing` for
55
more information.
6+
7+
.. include:: /includes/fact-archiveMovedChunks.rst
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.. versionchanged:: 2.6
2+
3+
Chunk migrations can have an impact on disk space. Starting in
4+
MongoDB 2.6, the source shard automatically archives the migrated
5+
documents by default. For details, see :ref:`moveChunk-directory`.

source/includes/options-conf.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -940,10 +940,10 @@ description: |
940940
941941
.. versionchanged:: 2.6 {{role}} is now the default behavior of MongoDB.
942942
943-
When true, the {{role}} option forces the :program:`mongod` instances to save
944-
all documents migrated from this shard during chunk migrations to the
945-
``moveChunk`` directory of the :setting:`storage.dbPath`. MongoDB does not
946-
delete data stored in ``moveChunk``.
943+
When {{role}} is ``true``, the :program:`mongod` instance saves all
944+
documents migrated from the shard to the ``moveChunk`` directory of
945+
the :setting:`storage.dbPath`. MongoDB does not delete data stored in
946+
``moveChunk``.
947947
---
948948
program: conf
949949
name: auditLog.destination

0 commit comments

Comments
 (0)