Skip to content

Commit 6f202ef

Browse files
(DOCS-14449): maxCatchUpPercentageBeforeBlockingWrites server parameter
1 parent af4c25c commit 6f202ef

File tree

4 files changed

+63
-0
lines changed

4 files changed

+63
-0
lines changed

source/reference/command/moveChunk.txt

+9
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 5.0 (and 4.4.7, 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

+34
Original file line numberDiff line numberDiff line change
@@ -2735,6 +2735,40 @@ Sharding Parameters
27352735
- :parameter:`readHedgingMode`
27362736
- :ref:`mongos-hedged-reads`
27372737

2738+
.. parameter:: maxCatchUpPercentageBeforeBlockingWrites
2739+
2740+
.. versionadded:: 5.0 (*Also available starting in 4.4.7, 4.2.15, 4.0.26*)
2741+
2742+
*Type*: integer
2743+
2744+
*Default*: 10
2745+
2746+
|mongod-only|
2747+
2748+
For :dbcommand:`moveChunk` operations, specifies the maximum
2749+
percentage of untrasferred data allowed by the migration protocol
2750+
(expressed in percentage of the total chunk size) to
2751+
transition from the ``catchup`` phase to the ``commit`` phase.
2752+
2753+
Setting a higher catchup percentage can decrease the amount of time
2754+
it takes for the migration to complete at the cost of increased
2755+
latency during concurrent :method:`upsert <db.collection.updateOne>`
2756+
and :method:`delete <db.collection.deleteOne>` operations.
2757+
2758+
For example, to set the maximum percentage to 20, you can issue the
2759+
followingduring startup:
2760+
2761+
.. code-block:: bash
2762+
2763+
mongod --setParameter maxCatchUpPercentageBeforeBlockingWrites=20
2764+
2765+
You cannot change
2766+
:parameter:`maxCatchUpPercentageBeforeBlockingWrites` during runtime.
2767+
2768+
.. seealso::
2769+
2770+
`Live Migration Protocol <https://github.com/mongodb/mongo/blob/master/src/mongo/db/s/README.md#the-live-migration-protocol>`__
2771+
27382772
.. parameter:: readHedgingMode
27392773

27402774
.. versionadded:: 4.4

source/release-notes/5.0.txt

+18
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,24 @@ merged.
526526
The ``owningShard`` field helps identify shards where split or merge
527527
operations frequently occur.
528528

529+
``maxCatchUpPercentageBeforeBlockingWrites`` Server Parameter
530+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
531+
532+
Starting in MongoDB 5.0 (and 4.4.7, 4.2.15 4.0.26), you can set the
533+
:parameter:`maxCatchUpPercentageBeforeBlockingWrites` to specify the
534+
maximum allowed percentage of data not yet migrated
535+
during a :dbcommand:`moveChunk` operation when compared to the
536+
total size (in MBs) of the chunk being transferred.
537+
538+
This parameter can affect the behavior of:
539+
540+
- :dbcommand:`moveChunk` commands that are run manually.
541+
542+
- Load balancer functionality, which automatically runs multiple
543+
:dbcommand:`moveChunk` commands to evenly distribute chunks across
544+
shards. See :ref:`sharding-balancing`.
545+
546+
529547
.. _5.0-rel-notes-shell:
530548

531549
Shell Changes

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

+2
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)