Skip to content

Commit 296a374

Browse files
committed
DOCS-10686: serverStatus and logical sessions info
1 parent e273528 commit 296a374

File tree

2 files changed

+98
-8
lines changed

2 files changed

+98
-8
lines changed

source/reference/command/serverStatus.txt

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,84 @@ globalLock
563563

564564
The number of active client connections performing write operations.
565565

566+
.. _server-status-logicalSessions:
567+
568+
logicalSessionRecordCache
569+
~~~~~~~~~~~~~~~~~~~~~~~~~
570+
571+
.. versionadded:: 3.6
572+
573+
.. code-block:: javascript
574+
575+
"logicalSessionRecordCache" : {
576+
"activeSessionsCount" : <num>,
577+
"sessionsCollectionJobCount" : <num>,
578+
"lastSessionsCollectionJobDurationMillis" : <num>,
579+
"lastSessionsCollectionJobTimestamp" : <Date>,
580+
"lastSessionsCollectionJobEntriesRefreshed" : <num>,
581+
"lastSessionsCollectionJobEntriesEnded" : <num>,
582+
"lastSessionsCollectionJobCursorsClosed" : <num>,
583+
"transactionReaperJobCount" : <num>,
584+
"lastTransactionReaperJobDurationMillis" : <num>,
585+
"lastTransactionReaperJobTimestamp" : <Date>,
586+
"lastTransactionReaperJobEntriesCleanedUp" : <num>
587+
},
588+
589+
.. serverstatus:: logicalSessionRecordCache.activeSessionsCount
590+
591+
The number of all active local sessions cached in memory by the
592+
:program:`mongod` or :program:`mongos` instance since the last
593+
refresh period.
594+
595+
.. seealso:: :pipeline:`$listLocalSessions`, :parameter:`logicalSessionRefreshMinutes`
596+
597+
.. serverstatus:: logicalSessionRecordCache.sessionsCollectionJobCount
598+
599+
The number that tracks the number of times the refresh process has
600+
run on the :data:`config.system.sessions` collection.
601+
602+
.. seealso:: :parameter:`logicalSessionRefreshMinutes`
603+
604+
.. serverstatus:: logicalSessionRecordCache.lastSessionsCollectionJobDurationMillis
605+
606+
The length in milliseconds of the last refresh.
607+
608+
.. serverstatus:: logicalSessionRecordCache.lastSessionsCollectionJobTimestamp
609+
610+
The time at which the last refresh occurred.
611+
612+
.. serverstatus:: logicalSessionRecordCache.lastSessionsCollectionJobEntriesRefreshed
613+
614+
The number of sessions that were refreshed during the last refresh.
615+
616+
.. serverstatus:: logicalSessionRecordCache.lastSessionsCollectionJobEntriesEnded"
617+
618+
The number of sessions that ended during the last refresh.
619+
620+
.. serverstatus:: logicalSessionRecordCache.lastSessionsCollectionJobCursorsClosed"
621+
622+
The number of cursors that were closed during the last
623+
:data:`config.system.sessions` collection refresh.
624+
625+
.. serverstatus:: logicalSessionRecordCache.transactionReaperJobCount"
626+
627+
The number that tracks the number of times the transaction record
628+
cleanup process has run on the :data:`config.transactions`
629+
collection.
630+
631+
.. serverstatus:: logicalSessionRecordCache.lastTransactionReaperJobDurationMillis"
632+
633+
The length (in milleseconds) of the last transaction record cleanup.
634+
635+
.. serverstatus:: logicalSessionRecordCache.lastTransactionReaperJobTimestamp"
636+
637+
The time of the last transaction record cleanup.
638+
639+
.. serverstatus:: logicalSessionRecordCache.lastTransactionReaperJobEntriesCleanedUp"
640+
641+
The number of entries in the :data:`config.transactions` collection
642+
that were deleted during the last transaction record cleanup.
643+
566644
.. _locks:
567645
.. _server-status-locks:
568646

source/release-notes/3.6.txt

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,21 +69,23 @@ MongoDB 3.6 adds the following new aggregation pipeline stages:
6969
* - Operator
7070
- Description
7171

72+
* - :pipeline:`$currentOp`
73+
74+
- Returns a stream of documents containing information
75+
on active and/or dormant operations on a :program:`mongod`
76+
instance. Uses the new aggregation helper
77+
:method:`db.aggregate()`.
78+
7279
* - :pipeline:`$listSessions`
7380

7481
- Lists sessions in the ``system.sessions`` collection in the
75-
``config`` database.
82+
``config`` database. Uses the new aggregation helper
83+
:method:`db.aggregate()`.
7684

7785
* - :pipeline:`$listLocalSessions`
7886

7987
- Lists sessions cached in memory by the server.
8088

81-
* - :pipeline:`$currentOp`
82-
83-
- Returns a stream of documents containing information
84-
on active and/or dormant operations on a :program:`mongod`
85-
instance.
86-
8789
New Aggregation Operators
8890
~~~~~~~~~~~~~~~~~~~~~~~~~
8991

@@ -127,6 +129,8 @@ aggregations that do not rely on an underlying collection, such
127129
as those that start with :pipeline:`$currentOp` or
128130
:pipeline:`$listLocalSessions`.
129131

132+
See also :ref:`3.6-agg-stages` added to support sessions.
133+
130134
New Aggregation Variable
131135
~~~~~~~~~~~~~~~~~~~~~~~~
132136

@@ -336,7 +340,14 @@ pipeline stages:
336340

337341
* - :pipeline:`$listLocalSessions`
338342

339-
- Lists sessions cached in memory by the server.
343+
- Lists sessions cached in memory by the server. Uses the new
344+
aggregation helper :method:`db.aggregate()`.
345+
346+
General
347+
~~~~~~~
348+
349+
:dbcommand:`serverStatus` returns information on the number of
350+
:ref:`server-status-logicalSessions`.
340351

341352
Command Options
342353
~~~~~~~~~~~~~~~
@@ -394,6 +405,7 @@ The following new parameters are available for server sessions:
394405

395406
- :parameter:`maxAcceptableLogicalClockDriftSecs`
396407

408+
397409
JSON Schema
398410
-----------
399411

0 commit comments

Comments
 (0)