Skip to content

Commit ba9a879

Browse files
DOCS-16559 Backport Add duration of how long an oplog slot is kept open (#6849)
* DOCS-15960 Add duration of how long an oplog slot is kept open (#4153) * DOCSP-15960 Add duration of how long an oplog slot is kept open * DOCS-15960 updates for CR feedback * DOCSP-15960 include filename correction * Update source/tutorial/troubleshoot-replica-sets.txt Co-authored-by: Ashley Brown <[email protected]> * DOCS-15960 moved example to includes file --------- Co-authored-by: Ashley Brown <[email protected]> * DOCS-16559 Backport Add duration of how long an oplog slot is kept open --------- Co-authored-by: Ashley Brown <[email protected]>
1 parent ef0382d commit ba9a879

File tree

4 files changed

+29
-3
lines changed

4 files changed

+29
-3
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Starting in MongoDB 7.0, the ``totalOplogSlotDurationMicros`` in the
2+
slow query log message shows the time between a write operation getting
3+
a commit timestamp to commit the storage engine writes and actually
4+
committing. ``mongod`` supports parallel writes. However, it commits
5+
write operations with commit timestamps in any order.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Consider the following writes with commit timestamps:
2+
3+
- writeA with Timestamp1
4+
- writeB with Timestamp2
5+
- writeC with Timestamp3
6+
7+
Suppose writeB commits first at Timestamp2. Replication is paused
8+
until writeA commits because writeA's oplog entry with Timestamp1 is
9+
required for replication to copy the oplog to secondary replica set
10+
members.

source/reference/log-messages.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -900,9 +900,14 @@ a slow :doc:`aggregation </aggregation>` operation:
900900

901901
{"t":{"$date":"2020-05-20T20:10:08.731+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn281","msg":"Slow query","attr":{"type":"command","ns":"stocks.trades","appName":"MongoDB Shell","command":{"aggregate":"trades","pipeline":[{"$project":{"ticker":1.0,"price":1.0,"priceGTE110":{"$gte":["$price",110.0]},"_id":0.0}},{"$sort":{"price":-1.0}}],"allowDiskUse":true,"cursor":{},"lsid":{"id":{"$uuid":"fa658f9e-9cd6-42d4-b1c8-c9160fabf2a2"}},"$clusterTime":{"clusterTime":{"$timestamp":{"t":1590005405,"i":1}},"signature":{"hash":{"$binary":{"base64":"AAAAAAAAAAAAAAAAAAAAAAAAAAA=","subType":"0"}},"keyId":0}},"$db":"test"},"planSummary":"COLLSCAN","cursorid":1912190691485054730,"keysExamined":0,"docsExamined":1000001,"hasSortStage":true,"usedDisk":true,"numYields":1002,"nreturned":101,"reslen":17738,"locks":{"ReplicationStateTransition":{"acquireCount":{"w":1119}},"Global":{"acquireCount":{"r":1119}},"Database":{"acquireCount":{"r":1119}},"Collection":{"acquireCount":{"r":1119}},"Mutex":{"acquireCount":{"r":117}}},"storage":{"data":{"bytesRead":232899899,"timeReadingMicros":186017},"timeWaitingMicros":{"cache":849}},"remote": "192.168.14.15:37666","protocol":"op_msg","durationMillis":22427}}
902902

903-
See the :ref:`examples section <log-message-json-examples>` for a
904-
:ref:`pretty-printed <log-message-pretty-printing>` version of this log
905-
entry.
903+
.. include:: /includes/fact-totalOplogSlotDurationMicros.rst
904+
905+
.. example::
906+
907+
.. include:: /includes/fact-totalOplogSlotDurationMicrosExample.rst
908+
909+
For a :ref:`pretty-printed <log-message-pretty-printing>` example of a
910+
slow operation log entry, see :ref:`log-message-json-examples`.
906911

907912
.. _log-messages-remoteOpWaitMillis:
908913

source/tutorial/troubleshoot-replica-sets.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ To check the current length of replication lag:
7070
The :method:`rs.status()` method is a wrapper around the
7171
:dbcommand:`replSetGetStatus` database command.
7272

73+
.. include:: /includes/fact-totalOplogSlotDurationMicros.rst
74+
75+
.. example::
76+
77+
.. include:: /includes/fact-totalOplogSlotDurationMicrosExample.rst
78+
7379
- Monitor the rate of replication by checking for non-zero or increasing
7480
oplog time values in the :guilabel:`Replication Lag` graph available in
7581
`Cloud Manager <https://docs.cloudmanager.mongodb.com/reference/alerts/replication-lag/>`_

0 commit comments

Comments
 (0)