Skip to content

DOCS-13944 Backport DOCS-12740 to 4.0: logicalSessionRecordCache.sess… #4785

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions source/includes/extracts-server-status-projection-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ content: |
ref: _serverStatus-output-changes
content: |

- Starting in MongoDB 4.0.22, {{operationName}} includes:

- :serverstatus:`logicalSessionRecordCache.sessionCatalogSize`

- Starting in MongoDB 4.0.19, {{operationName}} includes:

- :serverstatus:`security.metrics.aggStageCounters`
Expand Down
46 changes: 36 additions & 10 deletions source/reference/command/serverStatus.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,24 @@ Definition
applications can run this command at a regular interval to
collect statistics about the instance.

.. code-block:: javascript
Syntax
------

The command has the following syntax:

db.runCommand( { serverStatus: 1 } )
.. code-block:: javascript

db.runCommand( { serverStatus: 1 } )

The value (i.e. ``1`` above) does not affect the operation of the
command. The :binary:`~bin.mongo` shell provides the
:method:`db.serverStatus()` wrapper for the command.
The value specified (``1`` above) does not affect the operation of the
command. The :binary:`~bin.mongo` shell provides the
:method:`db.serverStatus()` wrapper for the command.

.. seealso::
.. seealso::

Much of the output of :dbcommand:`serverStatus` is also displayed
dynamically by :binary:`~bin.mongostat`. See the
:doc:`/reference/program/mongostat` command for more information.
Much of the output of :dbcommand:`serverStatus` is also displayed
dynamically by :binary:`~bin.mongostat`. See the
:doc:`/reference/program/mongostat` command for more information.

Behavior
--------
Expand Down Expand Up @@ -822,9 +827,15 @@ logicalSessionRecordCache
"transactionReaperJobCount" : <num>,
"lastTransactionReaperJobDurationMillis" : <num>,
"lastTransactionReaperJobTimestamp" : <Date>,
"lastTransactionReaperJobEntriesCleanedUp" : <num>
"lastTransactionReaperJobEntriesCleanedUp" : <num>,
"sessionCatalogSize" : <num> // Starting in MongoDB 4.0.22
},

.. serverstatus:: logicalSessionRecordCache

Provides metrics for caching of :doc:`server sessions
</reference/server-sessions/>`.

.. serverstatus:: logicalSessionRecordCache.activeSessionsCount

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

.. serverstatus:: logicalSessionRecordCache.sessionCatalogSize

- For a :binary:`~bin.mongod` instance:
The size of its in-memory cache of the `config.transactions`
entries. This corresponds to retryable writes
or transactions whose sessions have not expired within the
:parameter:`localLogicalSessionTimeoutMinutes`.

- For a :binary:`~bin.mongos` instance:
The number of the in-memory cache of its sessions that have had
transactions within the most recent
:parameter:`localLogicalSessionTimeoutMinutes` interval.

.. versionadded:: 4.0.22

.. _locks:
.. _server-status-locks:

Expand Down
6 changes: 3 additions & 3 deletions source/reference/config-database.txt
Original file line number Diff line number Diff line change
Expand Up @@ -483,9 +483,9 @@ instance.

.. data:: config.transactions

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

.. warning::

Expand Down