Skip to content

Commit 45cc588

Browse files
jason-price-mongodbjeff-allen-mongo
jason-price-mongodb
authored andcommitted
DOCSP-15308 reduce oplog entry size
1 parent a927fc5 commit 45cc588

File tree

2 files changed

+70
-1
lines changed

2 files changed

+70
-1
lines changed

source/reference/parameters.txt

+55
Original file line numberDiff line numberDiff line change
@@ -2098,6 +2098,61 @@ Replication and Consistency
20982098

20992099
mongod --setParameter maxSessions=1000
21002100

2101+
.. parameter:: storeFindAndModifyImagesInSideCollection
2102+
2103+
.. versionadded:: 5.1
2104+
2105+
|both|
2106+
2107+
*Type*: boolean
2108+
2109+
*Default*: true
2110+
2111+
Determines whether the temporary documents required for
2112+
:ref:`retryable <retryable-writes>` :dbcommand:`findAndModify`
2113+
commands are stored in the *side* collection
2114+
(``config.image_collection``).
2115+
2116+
If :parameter:`storeFindAndModifyImagesInSideCollection` is:
2117+
2118+
- ``true``, the temporary documents are stored in the side
2119+
collection.
2120+
2121+
- ``false``, the temporary documents are stored in the :ref:`replica
2122+
set oplog <replica-set-oplog>`.
2123+
2124+
Keep :parameter:`storeFindAndModifyImagesInSideCollection` set to
2125+
``true`` if you:
2126+
2127+
- Have a large :ref:`retryable <retryable-writes>`
2128+
:dbcommand:`findAndModify` workload.
2129+
2130+
- Require more temporary document space for :ref:`retryable
2131+
<retryable-writes>` :dbcommand:`findAndModify` commands than is
2132+
available in the :ref:`replica set oplog
2133+
<replica-set-oplog>`.
2134+
2135+
.. note::
2136+
2137+
:term:`Secondaries <secondary>` may experience increased CPU
2138+
usage when :parameter:`storeFindAndModifyImagesInSideCollection`
2139+
is ``true``.
2140+
2141+
For example, to set
2142+
:parameter:`storeFindAndModifyImagesInSideCollection` to ``false``
2143+
during startup:
2144+
2145+
.. code-block:: bash
2146+
2147+
mongod --setParameter storeFindAndModifyImagesInSideCollection=false
2148+
2149+
During runtime, you can also set the parameter with the
2150+
:dbcommand:`setParameter` command:
2151+
2152+
.. code-block:: javascript
2153+
2154+
db.adminCommand( { setParameter: 1, storeFindAndModifyImagesInSideCollection: false } )
2155+
21012156
.. parameter:: TransactionRecordMinimumLifetimeMinutes
21022157

21032158
.. versionadded:: 3.6

source/release-notes/5.1.txt

+15-1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,18 @@ If the new parameter
2828

2929
- If the new query execution engine is used, new fields are included in
3030
the :ref:`query explain plan output
31-
<explain-results-enhanced-execution>`.
31+
<explain-results-enhanced-execution>`.
32+
33+
.. _5.1-rel-notes-repl-sets:
34+
35+
Replica Sets
36+
------------
37+
38+
``storeFindAndModifyImagesInSideCollection`` Parameter
39+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
40+
41+
Starting in MongoDB 5.1, the
42+
:parameter:`storeFindAndModifyImagesInSideCollection` parameter
43+
determines whether the temporary documents required for :ref:`retryable
44+
<retryable-writes>` :dbcommand:`findAndModify` commands are stored in
45+
the *side* collection (``config.image_collection``).

0 commit comments

Comments
 (0)