Skip to content

Commit 59beccf

Browse files
npentreljeff-allen-mongo
authored andcommitted
DOCS-13635 add minSnapshotHistoryWindowInSeconds
1 parent 2539e4c commit 59beccf

File tree

3 files changed

+94
-54
lines changed

3 files changed

+94
-54
lines changed

source/core/wiredtiger.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ metadata table is atomically updated to reference the new checkpoint.
5656
Once the new checkpoint is accessible, WiredTiger frees pages from the
5757
old checkpoints.
5858

59+
Starting in MongoDB 5.0, you can use the
60+
:parameter:`minSnapshotHistoryWindowInSeconds` parameter to control how
61+
long WiredTiger keeps the snapshot history.
62+
5963
Using WiredTiger, even without :ref:`journaling
6064
<storage-wiredtiger-journal>`, MongoDB can recover from the last
6165
checkpoint; however, to recover changes made after the last checkpoint,

source/reference/parameters.txt

Lines changed: 81 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -3377,43 +3377,6 @@ Sharding Parameters
33773377
Storage Parameters
33783378
~~~~~~~~~~~~~~~~~~
33793379

3380-
.. parameter:: journalCommitInterval
3381-
3382-
|mongod-only|
3383-
3384-
Specify an integer between ``1`` and ``500`` signifying the number
3385-
of milliseconds (ms) between journal commits.
3386-
3387-
Consider the following example which sets the
3388-
:parameter:`journalCommitInterval` to ``200`` ms:
3389-
3390-
.. code-block:: javascript
3391-
3392-
db.adminCommand( { setParameter: 1, journalCommitInterval: 200 } )
3393-
3394-
.. seealso:: :setting:`storage.journal.commitIntervalMs`
3395-
3396-
.. parameter:: syncdelay
3397-
3398-
|mongod-only|
3399-
3400-
Specify the interval in seconds between :term:`fsync` operations
3401-
where :binary:`~bin.mongod` flushes its working memory to disk. By
3402-
default, :binary:`~bin.mongod` flushes memory to disk every 60
3403-
seconds. In almost every situation you should not set this value
3404-
and use the default setting.
3405-
3406-
Consider the following example which sets the ``syncdelay`` to
3407-
``60`` seconds:
3408-
3409-
.. code-block:: javascript
3410-
3411-
db.adminCommand( { setParameter: 1, syncdelay: 60 } )
3412-
3413-
.. seealso::
3414-
- :parameter:`journalCommitInterval`
3415-
- :setting:`storage.syncPeriodSecs`
3416-
34173380
.. parameter:: honorSystemUmask
34183381

34193382
.. versionadded:: 3.6
@@ -3424,14 +3387,14 @@ Storage Parameters
34243387

34253388
If :parameter:`honorSystemUmask` is set to ``true``, new files
34263389
created by MongoDB have permissions in accordance with the
3427-
user's ``umask`` settings. You cannot set :parameter:`processUmask`
3390+
user's ``umask`` settings. You cannot set :parameter:`processUmask`
34283391
if :parameter:`honorSystemUmask` is set to ``true``.
34293392

34303393
If :parameter:`honorSystemUmask` is set to ``false``, new files
34313394
created by MongoDB have permissions set to ``600``, which gives
34323395
read and write permissions only to the owner. New directories have
3433-
permissions set to ``700``. You can use :parameter:`processUmask`
3434-
to override the default permissions for groups and other users on
3396+
permissions set to ``700``. You can use :parameter:`processUmask`
3397+
to override the default permissions for groups and other users on
34353398
all new files created by MongoDB.
34363399

34373400
You can only set this parameter during start-up and cannot change
@@ -3445,28 +3408,71 @@ Storage Parameters
34453408

34463409
:parameter:`honorSystemUmask` is not available on Windows systems.
34473410

3411+
.. parameter:: journalCommitInterval
3412+
3413+
|mongod-only|
3414+
3415+
Specify an integer between ``1`` and ``500`` signifying the number
3416+
of milliseconds (ms) between journal commits.
3417+
3418+
Consider the following example which sets the
3419+
:parameter:`journalCommitInterval` to ``200`` ms:
3420+
3421+
.. code-block:: javascript
3422+
3423+
db.adminCommand( { setParameter: 1, journalCommitInterval: 200 } )
3424+
3425+
.. seealso:: :setting:`storage.journal.commitIntervalMs`
3426+
3427+
.. parameter:: minSnapshotHistoryWindowInSeconds
3428+
3429+
..versionadded:: 5.0
3430+
3431+
|mongod-only|
3432+
3433+
The minimum time window in seconds for which the storage engine keeps
3434+
the snapshot history. If you query data using read concern
3435+
:readconcern: snapshot and specify an
3436+
:ref:`atClusterTime <atClusterTime>` value older than the specified
3437+
``minSnapshotHistoryWindowInSeconds``, :binary:`~bin.mongod` returns
3438+
a ``SnapshotTooOld`` error.
3439+
3440+
Specify an integer greater than or equal to (``>=``) 1.
3441+
3442+
Consider the following example which sets the
3443+
``minSnapshotHistoryWindowInSeconds`` to ``600`` seconds:
3444+
3445+
.. code-block:: javascript
3446+
3447+
db.adminCommand( { setParameter: 1, minSnapshotHistoryWindowInSeconds: 600 } )
3448+
3449+
.. seealso::
3450+
- Read concern :readconcern:`"snapshot"`
3451+
- :ref:`Snapshots and Checkpoints
3452+
<storage-wiredtiger-checkpoints>`
3453+
34483454
.. parameter:: processUmask
34493455

34503456
.. versionadded:: 4.4
34513457

34523458
|mongod-only|
34533459

3454-
Overrides the default permissions used for groups and other users
3455-
when :parameter:`honorSystemUmask` is set to ``false``. By default,
3456-
when :parameter:`honorSystemUmask` is set to ``false``, new files
3457-
created by MongoDB have permissions set to ``600``. Use the
3458-
``processUmask`` parameter to override this default with a custom
3459-
``umask`` value. The file owner inherits permissions from the system
3460-
``umask``.
3461-
3462-
You cannot set this parameter if :parameter:`honorSystemUmask` is set
3463-
to ``true``. You can only set this parameter during start-up and cannot
3464-
change this setting using the :dbcommand:`setParameter` database
3460+
Overrides the default permissions used for groups and other users
3461+
when :parameter:`honorSystemUmask` is set to ``false``. By default,
3462+
when :parameter:`honorSystemUmask` is set to ``false``, new files
3463+
created by MongoDB have permissions set to ``600``. Use the
3464+
``processUmask`` parameter to override this default with a custom
3465+
``umask`` value. The file owner inherits permissions from the system
3466+
``umask``.
3467+
3468+
You cannot set this parameter if :parameter:`honorSystemUmask` is set
3469+
to ``true``. You can only set this parameter during start-up and cannot
3470+
change this setting using the :dbcommand:`setParameter` database
34653471
command.
34663472

3467-
Consider the following example, which sets the permissions for groups
3468-
and other users to read/write only and retains the system ``umask``
3469-
settings for the owner:
3473+
Consider the following example, which sets the permissions for groups
3474+
and other users to read/write only and retains the system ``umask``
3475+
settings for the owner:
34703476

34713477
.. code-block:: sh
34723478

@@ -3476,6 +3482,27 @@ Storage Parameters
34763482

34773483
:parameter:`processUmask` is not available on Windows systems.
34783484

3485+
.. parameter:: syncdelay
3486+
3487+
|mongod-only|
3488+
3489+
Specify the interval in seconds between :term:`fsync` operations
3490+
where :binary:`~bin.mongod` flushes its working memory to disk. By
3491+
default, :binary:`~bin.mongod` flushes memory to disk every 60
3492+
seconds. In almost every situation you should not set this value
3493+
and use the default setting.
3494+
3495+
Consider the following example which sets the ``syncdelay`` to
3496+
``60`` seconds:
3497+
3498+
.. code-block:: javascript
3499+
3500+
db.adminCommand( { setParameter: 1, syncdelay: 60 } )
3501+
3502+
.. seealso::
3503+
- :parameter:`journalCommitInterval`
3504+
- :setting:`storage.syncPeriodSecs`
3505+
34793506
WiredTiger Parameters
34803507
~~~~~~~~~~~~~~~~~~~~~
34813508

source/release-notes/5.0.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,15 @@ restarts, index creation resumes from the saved position.
139139
Removed Commands
140140
----------------
141141

142+
.. _5.0-new-parameters:
143+
144+
New Parameters
145+
--------------
146+
147+
Starting in MongoDB 5.0, you can use the
148+
:parameter:`minSnapshotHistoryWindowInSeconds` parameter to control how
149+
long WiredTiger keeps the snapshot history.
150+
142151
.. _5.0-rel-notes-networking:
143152

144153
Networking

0 commit comments

Comments
 (0)