Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOCSP-15308 reduce oplog entry size #5793

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions source/reference/parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 <retryable-writes>` :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 <replica-set-oplog>`.

Keep :parameter:`storeFindAndModifyImagesInSideCollection` set to
``true`` if you:

- Have a large :ref:`retryable <retryable-writes>`
:dbcommand:`findAndModify` workload.

- Require more temporary document space for :ref:`retryable
<retryable-writes>` :dbcommand:`findAndModify` commands than is
available in the :ref:`replica set oplog
<replica-set-oplog>`.

.. note::

:term:`Secondaries <secondary>` 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
Expand Down
16 changes: 15 additions & 1 deletion source/release-notes/5.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
<explain-results-enhanced-execution>`.
<explain-results-enhanced-execution>`.

.. _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
<retryable-writes>` :dbcommand:`findAndModify` commands are stored in
the *side* collection (``config.image_collection``).