Skip to content

Commit

Permalink
(DOCS-14449): maxCatchUpPercentageBeforeBlockingWrites server parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff-allen-mongo committed Aug 26, 2021
1 parent 312fb1c commit fa522b8
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
9 changes: 9 additions & 0 deletions source/reference/command/moveChunk.txt
Original file line number Diff line number Diff line change
Expand Up @@ -188,5 +188,14 @@ while :dbcommand:`moveChunk` is running, you may see this
error. You may retry the :dbcommand:`moveChunk` operation without
side effects.

``maxCatchUpPercentageBeforeBlockingWrites`` Server Parameter
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Starting in MongoDB 4.2.15 (and 4.0.26), you can set the
:parameter:`maxCatchUpPercentageBeforeBlockingWrites` to specify the
maximum allowed percentage of data not yet migrated
during a :dbcommand:`moveChunk` operation when compared to the
total size (in MBs) of the chunk being transferred.


.. admin-only
34 changes: 34 additions & 0 deletions source/reference/parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2073,6 +2073,40 @@ Sharding Parameters
- :serverstatus:`shardedIndexConsistency` metrics returned by the
:dbcommand:`serverStatus` command.

.. parameter:: maxCatchUpPercentageBeforeBlockingWrites

.. versionadded:: 4.2.15 (*Also available starting in 4.0.26*)

*Type*: integer

*Default*: 10

|mongod-only|

For :dbcommand:`moveChunk` operations, specifies the maximum
percentage of untrasferred data allowed by the migration protocol
(expressed in percentage of the total chunk size) to
transition from the ``catchup`` phase to the ``commit`` phase.

Setting a higher catchup percentage can decrease the amount of time
it takes for the migration to complete at the cost of increased
latency during concurrent :method:`upsert <db.collection.updateOne>`
and :method:`delete <db.collection.deleteOne>` operations.

For example, to set the maximum percentage to 20, you can issue the
followingduring startup:

.. code-block:: bash

mongod --setParameter maxCatchUpPercentageBeforeBlockingWrites=20

You cannot change
:parameter:`maxCatchUpPercentageBeforeBlockingWrites` during runtime.

.. seealso::

`Live Migration Protocol <https://github.com/mongodb/mongo/blob/master/src/mongo/db/s/README.md#the-live-migration-protocol>`__

.. parameter:: shardedIndexConsistencyCheckIntervalMS

.. versionadded:: 4.2.6
Expand Down
2 changes: 2 additions & 0 deletions source/tutorial/migrate-chunks-in-sharded-cluster.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _migrate-chunks-sharded-cluster:

===================================
Migrate Chunks in a Sharded Cluster
===================================
Expand Down

0 comments on commit fa522b8

Please sign in to comment.