Skip to content

Commit fa522b8

Browse files
(DOCS-14449): maxCatchUpPercentageBeforeBlockingWrites server parameter
1 parent 312fb1c commit fa522b8

File tree

3 files changed

+45
-0
lines changed

3 files changed

+45
-0
lines changed

source/reference/command/moveChunk.txt

+9
Original file line numberDiff line numberDiff line change
@@ -188,5 +188,14 @@ while :dbcommand:`moveChunk` is running, you may see this
188188
error. You may retry the :dbcommand:`moveChunk` operation without
189189
side effects.
190190

191+
``maxCatchUpPercentageBeforeBlockingWrites`` Server Parameter
192+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
193+
194+
Starting in MongoDB 4.2.15 (and 4.0.26), you can set the
195+
:parameter:`maxCatchUpPercentageBeforeBlockingWrites` to specify the
196+
maximum allowed percentage of data not yet migrated
197+
during a :dbcommand:`moveChunk` operation when compared to the
198+
total size (in MBs) of the chunk being transferred.
199+
191200

192201
.. admin-only

source/reference/parameters.txt

+34
Original file line numberDiff line numberDiff line change
@@ -2073,6 +2073,40 @@ Sharding Parameters
20732073
- :serverstatus:`shardedIndexConsistency` metrics returned by the
20742074
:dbcommand:`serverStatus` command.
20752075

2076+
.. parameter:: maxCatchUpPercentageBeforeBlockingWrites
2077+
2078+
.. versionadded:: 4.2.15 (*Also available starting in 4.0.26*)
2079+
2080+
*Type*: integer
2081+
2082+
*Default*: 10
2083+
2084+
|mongod-only|
2085+
2086+
For :dbcommand:`moveChunk` operations, specifies the maximum
2087+
percentage of untrasferred data allowed by the migration protocol
2088+
(expressed in percentage of the total chunk size) to
2089+
transition from the ``catchup`` phase to the ``commit`` phase.
2090+
2091+
Setting a higher catchup percentage can decrease the amount of time
2092+
it takes for the migration to complete at the cost of increased
2093+
latency during concurrent :method:`upsert <db.collection.updateOne>`
2094+
and :method:`delete <db.collection.deleteOne>` operations.
2095+
2096+
For example, to set the maximum percentage to 20, you can issue the
2097+
followingduring startup:
2098+
2099+
.. code-block:: bash
2100+
2101+
mongod --setParameter maxCatchUpPercentageBeforeBlockingWrites=20
2102+
2103+
You cannot change
2104+
:parameter:`maxCatchUpPercentageBeforeBlockingWrites` during runtime.
2105+
2106+
.. seealso::
2107+
2108+
`Live Migration Protocol <https://github.com/mongodb/mongo/blob/master/src/mongo/db/s/README.md#the-live-migration-protocol>`__
2109+
20762110
.. parameter:: shardedIndexConsistencyCheckIntervalMS
20772111

20782112
.. versionadded:: 4.2.6

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)