Skip to content

Commit 20c2a3d

Browse files
kay-kimandf-mongodb
authored andcommitted
DOCS-13944 Backport DOCS-12740 to 4.0: logicalSessionRecordCache.sessionCatalogSize
1 parent 28ef3bf commit 20c2a3d

File tree

3 files changed

+43
-13
lines changed

3 files changed

+43
-13
lines changed

source/includes/extracts-server-status-projection-base.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ content: |
1212
ref: _serverStatus-output-changes
1313
content: |
1414
15+
- Starting in MongoDB 4.0.22, {{operationName}} includes:
16+
17+
- :serverstatus:`logicalSessionRecordCache.sessionCatalogSize`
18+
1519
- Starting in MongoDB 4.0.19, {{operationName}} includes:
1620
1721
- :serverstatus:`security.metrics.aggStageCounters`

source/reference/command/serverStatus.txt

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,24 @@ Definition
2020
applications can run this command at a regular interval to
2121
collect statistics about the instance.
2222

23-
.. code-block:: javascript
23+
Syntax
24+
------
25+
26+
The command has the following syntax:
2427

25-
db.runCommand( { serverStatus: 1 } )
28+
.. code-block:: javascript
29+
30+
db.runCommand( { serverStatus: 1 } )
2631

27-
The value (i.e. ``1`` above) does not affect the operation of the
28-
command. The :binary:`~bin.mongo` shell provides the
29-
:method:`db.serverStatus()` wrapper for the command.
32+
The value specified (``1`` above) does not affect the operation of the
33+
command. The :binary:`~bin.mongo` shell provides the
34+
:method:`db.serverStatus()` wrapper for the command.
3035

31-
.. seealso::
36+
.. seealso::
3237

33-
Much of the output of :dbcommand:`serverStatus` is also displayed
34-
dynamically by :binary:`~bin.mongostat`. See the
35-
:doc:`/reference/program/mongostat` command for more information.
38+
Much of the output of :dbcommand:`serverStatus` is also displayed
39+
dynamically by :binary:`~bin.mongostat`. See the
40+
:doc:`/reference/program/mongostat` command for more information.
3641

3742
Behavior
3843
--------
@@ -822,9 +827,15 @@ logicalSessionRecordCache
822827
"transactionReaperJobCount" : <num>,
823828
"lastTransactionReaperJobDurationMillis" : <num>,
824829
"lastTransactionReaperJobTimestamp" : <Date>,
825-
"lastTransactionReaperJobEntriesCleanedUp" : <num>
830+
"lastTransactionReaperJobEntriesCleanedUp" : <num>,
831+
"sessionCatalogSize" : <num> // Starting in MongoDB 4.0.22
826832
},
827833

834+
.. serverstatus:: logicalSessionRecordCache
835+
836+
Provides metrics for caching of :doc:`server sessions
837+
</reference/server-sessions/>`.
838+
828839
.. serverstatus:: logicalSessionRecordCache.activeSessionsCount
829840

830841
The number of all active local sessions cached in memory by the
@@ -884,6 +895,21 @@ logicalSessionRecordCache
884895
The number of entries in the :data:`config.transactions` collection
885896
that were deleted during the last transaction record cleanup.
886897

898+
.. serverstatus:: logicalSessionRecordCache.sessionCatalogSize
899+
900+
- For a :binary:`~bin.mongod` instance:
901+
The size of its in-memory cache of the `config.transactions`
902+
entries. This corresponds to retryable writes
903+
or transactions whose sessions have not expired within the
904+
:parameter:`localLogicalSessionTimeoutMinutes`.
905+
906+
- For a :binary:`~bin.mongos` instance:
907+
The number of the in-memory cache of its sessions that have had
908+
transactions within the most recent
909+
:parameter:`localLogicalSessionTimeoutMinutes` interval.
910+
911+
.. versionadded:: 4.0.22
912+
887913
.. _locks:
888914
.. _server-status-locks:
889915

source/reference/config-database.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -483,9 +483,9 @@ instance.
483483

484484
.. data:: config.transactions
485485

486-
The ``transactions`` collection stores records used to support
487-
:ref:`retryable writes <retryable-writes>` for
488-
replica sets and sharded clusters.
486+
The ``transactions`` collection stores documents used to support
487+
:ref:`retryable writes <retryable-writes>` and :doc:`transactions
488+
</core/transactions>` for replica sets and sharded clusters.
489489

490490
.. warning::
491491

0 commit comments

Comments
 (0)