From 91e4bbc490a5c24374613fe6626f9a86b71200c6 Mon Sep 17 00:00:00 2001 From: Naomi Pentrel <5212232+npentrel@users.noreply.github.com> Date: Thu, 18 Feb 2021 16:38:36 +0100 Subject: [PATCH] DOCS-13635 add minSnapshotHistoryWindowInSeconds --- source/core/wiredtiger.txt | 4 + source/reference/parameters.txt | 135 +++++++++++++++++++------------- source/release-notes/5.0.txt | 9 +++ 3 files changed, 94 insertions(+), 54 deletions(-) diff --git a/source/core/wiredtiger.txt b/source/core/wiredtiger.txt index b03740646c5..c1e182fde43 100644 --- a/source/core/wiredtiger.txt +++ b/source/core/wiredtiger.txt @@ -56,6 +56,10 @@ metadata table is atomically updated to reference the new checkpoint. Once the new checkpoint is accessible, WiredTiger frees pages from the old checkpoints. +Starting in MongoDB 5.0, you can use the +:parameter:`minSnapshotHistoryWindowInSeconds` parameter to control how +long WiredTiger keeps the snapshot history. + Using WiredTiger, even without :ref:`journaling `, MongoDB can recover from the last checkpoint; however, to recover changes made after the last checkpoint, diff --git a/source/reference/parameters.txt b/source/reference/parameters.txt index 1e37535c803..52e7bddf29b 100644 --- a/source/reference/parameters.txt +++ b/source/reference/parameters.txt @@ -3377,43 +3377,6 @@ Sharding Parameters Storage Parameters ~~~~~~~~~~~~~~~~~~ -.. parameter:: journalCommitInterval - - |mongod-only| - - Specify an integer between ``1`` and ``500`` signifying the number - of milliseconds (ms) between journal commits. - - Consider the following example which sets the - :parameter:`journalCommitInterval` to ``200`` ms: - - .. code-block:: javascript - - db.adminCommand( { setParameter: 1, journalCommitInterval: 200 } ) - - .. seealso:: :setting:`storage.journal.commitIntervalMs` - -.. parameter:: syncdelay - - |mongod-only| - - Specify the interval in seconds between :term:`fsync` operations - where :binary:`~bin.mongod` flushes its working memory to disk. By - default, :binary:`~bin.mongod` flushes memory to disk every 60 - seconds. In almost every situation you should not set this value - and use the default setting. - - Consider the following example which sets the ``syncdelay`` to - ``60`` seconds: - - .. code-block:: javascript - - db.adminCommand( { setParameter: 1, syncdelay: 60 } ) - - .. seealso:: - - :parameter:`journalCommitInterval` - - :setting:`storage.syncPeriodSecs` - .. parameter:: honorSystemUmask .. versionadded:: 3.6 @@ -3424,14 +3387,14 @@ Storage Parameters If :parameter:`honorSystemUmask` is set to ``true``, new files created by MongoDB have permissions in accordance with the - user's ``umask`` settings. You cannot set :parameter:`processUmask` + user's ``umask`` settings. You cannot set :parameter:`processUmask` if :parameter:`honorSystemUmask` is set to ``true``. If :parameter:`honorSystemUmask` is set to ``false``, new files created by MongoDB have permissions set to ``600``, which gives read and write permissions only to the owner. New directories have - permissions set to ``700``. You can use :parameter:`processUmask` - to override the default permissions for groups and other users on + permissions set to ``700``. You can use :parameter:`processUmask` + to override the default permissions for groups and other users on all new files created by MongoDB. You can only set this parameter during start-up and cannot change @@ -3445,28 +3408,71 @@ Storage Parameters :parameter:`honorSystemUmask` is not available on Windows systems. +.. parameter:: journalCommitInterval + + |mongod-only| + + Specify an integer between ``1`` and ``500`` signifying the number + of milliseconds (ms) between journal commits. + + Consider the following example which sets the + :parameter:`journalCommitInterval` to ``200`` ms: + + .. code-block:: javascript + + db.adminCommand( { setParameter: 1, journalCommitInterval: 200 } ) + + .. seealso:: :setting:`storage.journal.commitIntervalMs` + +.. parameter:: minSnapshotHistoryWindowInSeconds + + ..versionadded:: 5.0 + + |mongod-only| + + The minimum time window in seconds for which the storage engine keeps + the snapshot history. If you query data using read concern + :readconcern: snapshot and specify an + :ref:`atClusterTime ` value older than the specified + ``minSnapshotHistoryWindowInSeconds``, :binary:`~bin.mongod` returns + a ``SnapshotTooOld`` error. + + Specify an integer greater than or equal to (``>=``) 1. + + Consider the following example which sets the + ``minSnapshotHistoryWindowInSeconds`` to ``600`` seconds: + + .. code-block:: javascript + + db.adminCommand( { setParameter: 1, minSnapshotHistoryWindowInSeconds: 600 } ) + + .. seealso:: + - Read concern :readconcern:`"snapshot"` + - :ref:`Snapshots and Checkpoints + ` + .. parameter:: processUmask .. versionadded:: 4.4 |mongod-only| - Overrides the default permissions used for groups and other users - when :parameter:`honorSystemUmask` is set to ``false``. By default, - when :parameter:`honorSystemUmask` is set to ``false``, new files - created by MongoDB have permissions set to ``600``. Use the - ``processUmask`` parameter to override this default with a custom - ``umask`` value. The file owner inherits permissions from the system - ``umask``. - - You cannot set this parameter if :parameter:`honorSystemUmask` is set - to ``true``. You can only set this parameter during start-up and cannot - change this setting using the :dbcommand:`setParameter` database + Overrides the default permissions used for groups and other users + when :parameter:`honorSystemUmask` is set to ``false``. By default, + when :parameter:`honorSystemUmask` is set to ``false``, new files + created by MongoDB have permissions set to ``600``. Use the + ``processUmask`` parameter to override this default with a custom + ``umask`` value. The file owner inherits permissions from the system + ``umask``. + + You cannot set this parameter if :parameter:`honorSystemUmask` is set + to ``true``. You can only set this parameter during start-up and cannot + change this setting using the :dbcommand:`setParameter` database command. - Consider the following example, which sets the permissions for groups - and other users to read/write only and retains the system ``umask`` - settings for the owner: + Consider the following example, which sets the permissions for groups + and other users to read/write only and retains the system ``umask`` + settings for the owner: .. code-block:: sh @@ -3476,6 +3482,27 @@ Storage Parameters :parameter:`processUmask` is not available on Windows systems. +.. parameter:: syncdelay + + |mongod-only| + + Specify the interval in seconds between :term:`fsync` operations + where :binary:`~bin.mongod` flushes its working memory to disk. By + default, :binary:`~bin.mongod` flushes memory to disk every 60 + seconds. In almost every situation you should not set this value + and use the default setting. + + Consider the following example which sets the ``syncdelay`` to + ``60`` seconds: + + .. code-block:: javascript + + db.adminCommand( { setParameter: 1, syncdelay: 60 } ) + + .. seealso:: + - :parameter:`journalCommitInterval` + - :setting:`storage.syncPeriodSecs` + WiredTiger Parameters ~~~~~~~~~~~~~~~~~~~~~ diff --git a/source/release-notes/5.0.txt b/source/release-notes/5.0.txt index cbae57b7037..1385b877bbd 100644 --- a/source/release-notes/5.0.txt +++ b/source/release-notes/5.0.txt @@ -139,6 +139,15 @@ restarts, index creation resumes from the saved position. Removed Commands ---------------- +.. _5.0-new-parameters: + +New Parameters +-------------- + +Starting in MongoDB 5.0, you can use the +:parameter:`minSnapshotHistoryWindowInSeconds` parameter to control how +long WiredTiger keeps the snapshot history. + .. _5.0-rel-notes-networking: Networking