Skip to content

Commit e879204

Browse files
jason-price-mongodbjason-price-mongodb
andauthored
DOCS-15437-reap-transactions (#2062)
* DOCS-15437-reap-transactions * DOCS-15437-reap-transactions * DOCS-15437-reap-transactions * DOCS-15437-reap-transactions * DOCS-15437-reap-transactions * DOCS-15437-reap-transactions * DOCS-15437-reap-transactions * DOCS-15437-reap-transactions * DOCS-15437-reap-transactions * DOCS-15437-reap-transactions * DOCS-15437-reap-transactions Co-authored-by: jason-price-mongodb <[email protected]>
1 parent 877f7fe commit e879204

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

source/reference/parameters.txt

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4824,6 +4824,39 @@ Transaction Parameters
48244824

48254825
db.adminCommand( { setParameter: 1, coordinateCommitReturnImmediatelyAfterPersistingDecision: true } )
48264826

4827+
.. parameter:: internalSessionsReapThreshold
4828+
4829+
.. versionadded:: 6.0
4830+
4831+
|both|
4832+
4833+
*Default*: 1000
4834+
4835+
Session limit for internal session metadata deletion. The metadata:
4836+
4837+
- Contains session transaction information for user operations.
4838+
- Is stored in the :data:`config.transactions` collection.
4839+
4840+
When the number of internal sessions is greater than
4841+
:parameter:`internalSessionsReapThreshold`, the metadata is deleted.
4842+
4843+
If you set :parameter:`internalSessionsReapThreshold` to ``0``, the
4844+
internal session metadata is only deleted when the user session ends.
4845+
4846+
The following example sets :parameter:`internalSessionsReapThreshold`
4847+
to ``500`` sessions:
4848+
4849+
.. code-block:: javascript
4850+
4851+
db.adminCommand( { setParameter: 1, internalSessionsReapThreshold: 500 } )
4852+
4853+
You can also set :parameter:`internalSessionsReapThreshold` at
4854+
startup. For example:
4855+
4856+
.. code-block:: bash
4857+
4858+
mongod --setParameter internalSessionsReapThreshold=500
4859+
48274860
.. parameter:: transactionLifetimeLimitSeconds
48284861

48294862
.. versionadded:: 4.0

source/release-notes/6.0.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,13 @@ minimum and maximum sharding TaskExecutor connection pool size for
265265
Starting in MongoDB 6.0, you can use :parameter:`changeStreamOptions` to control
266266
the retention policy of change stream pre- and post-images.
267267

268+
``internalSessionsReapThreshold`` Parameter
269+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
270+
271+
Starting in MongoDB 6.0, you can use the new
272+
:parameter:`internalSessionsReapThreshold` parameter to set the session
273+
limit for internal session metadata deletion.
274+
268275
Multiple Arbiters Unsupported
269276
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
270277

0 commit comments

Comments
 (0)