From f908a8a3e06a6494877ee5653428eefbcaa66016 Mon Sep 17 00:00:00 2001 From: Kay Kim Date: Sun, 30 Jun 2019 18:23:36 -0400 Subject: [PATCH] DOCS-13944 Backport DOCS-12740 to 4.0: logicalSessionRecordCache.sessionCatalogSize --- ...xtracts-server-status-projection-base.yaml | 4 ++ source/reference/command/serverStatus.txt | 46 +++++++++++++++---- source/reference/config-database.txt | 6 +-- 3 files changed, 43 insertions(+), 13 deletions(-) diff --git a/source/includes/extracts-server-status-projection-base.yaml b/source/includes/extracts-server-status-projection-base.yaml index f7736a56c26..5d0a67cee96 100644 --- a/source/includes/extracts-server-status-projection-base.yaml +++ b/source/includes/extracts-server-status-projection-base.yaml @@ -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` diff --git a/source/reference/command/serverStatus.txt b/source/reference/command/serverStatus.txt index 3f695211c38..bbc03a46ae4 100644 --- a/source/reference/command/serverStatus.txt +++ b/source/reference/command/serverStatus.txt @@ -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 -------- @@ -822,9 +827,15 @@ logicalSessionRecordCache "transactionReaperJobCount" : , "lastTransactionReaperJobDurationMillis" : , "lastTransactionReaperJobTimestamp" : , - "lastTransactionReaperJobEntriesCleanedUp" : + "lastTransactionReaperJobEntriesCleanedUp" : , + "sessionCatalogSize" : // Starting in MongoDB 4.0.22 }, +.. serverstatus:: logicalSessionRecordCache + + Provides metrics for caching of :doc:`server sessions + `. + .. serverstatus:: logicalSessionRecordCache.activeSessionsCount The number of all active local sessions cached in memory by the @@ -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: diff --git a/source/reference/config-database.txt b/source/reference/config-database.txt index d5f7fc87c08..9449a018b56 100644 --- a/source/reference/config-database.txt +++ b/source/reference/config-database.txt @@ -483,9 +483,9 @@ instance. .. data:: config.transactions - The ``transactions`` collection stores records used to support - :ref:`retryable writes ` for - replica sets and sharded clusters. + The ``transactions`` collection stores documents used to support + :ref:`retryable writes ` and :doc:`transactions + ` for replica sets and sharded clusters. .. warning::