From 4ca145300a77322a156f36ba4ee9e857bcd1d9bd Mon Sep 17 00:00:00 2001 From: jason-price-mongodb Date: Tue, 24 Aug 2021 07:58:56 -0700 Subject: [PATCH] DOCSP-15308 reduce oplog entry size --- source/reference/parameters.txt | 55 +++++++++++++++++++++++++++++++++ source/release-notes/5.1.txt | 16 +++++++++- 2 files changed, 70 insertions(+), 1 deletion(-) diff --git a/source/reference/parameters.txt b/source/reference/parameters.txt index 8ef1e409f71..874645024ff 100644 --- a/source/reference/parameters.txt +++ b/source/reference/parameters.txt @@ -2098,6 +2098,61 @@ Replication and Consistency mongod --setParameter maxSessions=1000 +.. parameter:: storeFindAndModifyImagesInSideCollection + + .. versionadded:: 5.1 + + |both| + + *Type*: boolean + + *Default*: true + + Determines whether the temporary documents required for + :ref:`retryable ` :dbcommand:`findAndModify` + commands are stored in the *side* collection + (``config.image_collection``). + + If :parameter:`storeFindAndModifyImagesInSideCollection` is: + + - ``true``, the temporary documents are stored in the side + collection. + + - ``false``, the temporary documents are stored in the :ref:`replica + set oplog `. + + Keep :parameter:`storeFindAndModifyImagesInSideCollection` set to + ``true`` if you: + + - Have a large :ref:`retryable ` + :dbcommand:`findAndModify` workload. + + - Require more temporary document space for :ref:`retryable + ` :dbcommand:`findAndModify` commands than is + available in the :ref:`replica set oplog + `. + + .. note:: + + :term:`Secondaries ` may experience increased CPU + usage when :parameter:`storeFindAndModifyImagesInSideCollection` + is ``true``. + + For example, to set + :parameter:`storeFindAndModifyImagesInSideCollection` to ``false`` + during startup: + + .. code-block:: bash + + mongod --setParameter storeFindAndModifyImagesInSideCollection=false + + During runtime, you can also set the parameter with the + :dbcommand:`setParameter` command: + + .. code-block:: javascript + + db.adminCommand( { setParameter: 1, storeFindAndModifyImagesInSideCollection: false } ) + .. parameter:: TransactionRecordMinimumLifetimeMinutes .. versionadded:: 3.6 diff --git a/source/release-notes/5.1.txt b/source/release-notes/5.1.txt index ea72b337242..03b56bb56e3 100644 --- a/source/release-notes/5.1.txt +++ b/source/release-notes/5.1.txt @@ -28,4 +28,18 @@ If the new parameter - If the new query execution engine is used, new fields are included in the :ref:`query explain plan output - `. \ No newline at end of file + `. + +.. _5.1-rel-notes-repl-sets: + +Replica Sets +------------ + +``storeFindAndModifyImagesInSideCollection`` Parameter +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Starting in MongoDB 5.1, the +:parameter:`storeFindAndModifyImagesInSideCollection` parameter +determines whether the temporary documents required for :ref:`retryable +` :dbcommand:`findAndModify` commands are stored in +the *side* collection (``config.image_collection``).