Skip to content

Commit 07bfee5

Browse files
jason-price-mongodbjason-price-mongodb
andauthored
DOCS-15437-reap-transactions (#2062) (#2103)
* 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]> Co-authored-by: jason-price-mongodb <[email protected]>
1 parent b755c07 commit 07bfee5

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
@@ -4732,6 +4732,39 @@ Transaction Parameters
47324732

47334733
db.adminCommand( { setParameter: 1, coordinateCommitReturnImmediatelyAfterPersistingDecision: true } )
47344734

4735+
.. parameter:: internalSessionsReapThreshold
4736+
4737+
.. versionadded:: 6.0
4738+
4739+
|both|
4740+
4741+
*Default*: 1000
4742+
4743+
Session limit for internal session metadata deletion. The metadata:
4744+
4745+
- Contains session transaction information for user operations.
4746+
- Is stored in the :data:`config.transactions` collection.
4747+
4748+
When the number of internal sessions is greater than
4749+
:parameter:`internalSessionsReapThreshold`, the metadata is deleted.
4750+
4751+
If you set :parameter:`internalSessionsReapThreshold` to ``0``, the
4752+
internal session metadata is only deleted when the user session ends.
4753+
4754+
The following example sets :parameter:`internalSessionsReapThreshold`
4755+
to ``500`` sessions:
4756+
4757+
.. code-block:: javascript
4758+
4759+
db.adminCommand( { setParameter: 1, internalSessionsReapThreshold: 500 } )
4760+
4761+
You can also set :parameter:`internalSessionsReapThreshold` at
4762+
startup. For example:
4763+
4764+
.. code-block:: bash
4765+
4766+
mongod --setParameter internalSessionsReapThreshold=500
4767+
47354768
.. parameter:: transactionLifetimeLimitSeconds
47364769

47374770
.. 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)