Skip to content

Commit 2a02f2d

Browse files
(DOCS-14449): maxCatchUpPercentageBeforeBlockingWrites server parameter
1 parent 55a8250 commit 2a02f2d

File tree

3 files changed

+45
-0
lines changed

3 files changed

+45
-0
lines changed

source/reference/command/moveChunk.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,5 +220,14 @@ while :dbcommand:`moveChunk` is running, you may see this
220220
error. You may retry the :dbcommand:`moveChunk` operation without
221221
side effects.
222222

223+
``maxCatchUpPercentageBeforeBlockingWrites`` Server Parameter
224+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
225+
226+
Starting in MongoDB 4.4.7 (and 4.2.15, 4.0.26), you can set the
227+
:parameter:`maxCatchUpPercentageBeforeBlockingWrites` to specify the
228+
maximum allowed percentage of data not yet migrated
229+
during a :dbcommand:`moveChunk` operation when compared to the
230+
total size (in MBs) of the chunk being transferred.
231+
223232

224233
.. admin-only

source/reference/parameters.txt

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2659,6 +2659,40 @@ Sharding Parameters
26592659
- :parameter:`readHedgingMode`
26602660
- :ref:`mongos-hedged-reads`
26612661

2662+
.. parameter:: maxCatchUpPercentageBeforeBlockingWrites
2663+
2664+
.. versionadded:: 4.4.7 (*Also available starting in 4.2.15, 4.0.26*)
2665+
2666+
*Type*: integer
2667+
2668+
*Default*: 10
2669+
2670+
|mongod-only|
2671+
2672+
For :dbcommand:`moveChunk` operations, specifies the maximum
2673+
percentage of untrasferred data allowed by the migration protocol
2674+
(expressed in percentage of the total chunk size) to
2675+
transition from the ``catchup`` phase to the ``commit`` phase.
2676+
2677+
Setting a higher catchup percentage can decrease the amount of time
2678+
it takes for the migration to complete at the cost of increased
2679+
latency during concurrent :method:`upsert <db.collection.updateOne>`
2680+
and :method:`delete <db.collection.deleteOne>` operations.
2681+
2682+
For example, to set the maximum percentage to 20, you can issue the
2683+
followingduring startup:
2684+
2685+
.. code-block:: bash
2686+
2687+
mongod --setParameter maxCatchUpPercentageBeforeBlockingWrites=20
2688+
2689+
You cannot change
2690+
:parameter:`maxCatchUpPercentageBeforeBlockingWrites` during runtime.
2691+
2692+
.. seealso::
2693+
2694+
`Live Migration Protocol <https://github.com/mongodb/mongo/blob/master/src/mongo/db/s/README.md#the-live-migration-protocol>`__
2695+
26622696
.. parameter:: readHedgingMode
26632697

26642698
.. versionadded:: 4.4

source/tutorial/migrate-chunks-in-sharded-cluster.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _migrate-chunks-sharded-cluster:
2+
13
===================================
24
Migrate Chunks in a Sharded Cluster
35
===================================

0 commit comments

Comments
 (0)