Skip to content

Commit 1bb233e

Browse files
author
Dave Cuthbert
authored
DOCSP-24282 metrics updated (#1900)
* DOCSP-24282 metrics updated * DOCSP-24282 metrics updated * DOCSP-24282 metrics updated * DOCSP-24282 metrics updated * Review feedback * Staging Fixes * Review feedback * Review feedback * Review feedback * Review feedback * Review feedback * Review feedback * Staging fixes * Staging fixes * Test layout * Test layout * Test layout * Staging fixes * Staging fixes * review feedback * Review feedback * Review Feedback * Review Feedback * Review feedback * Review feedback
1 parent fca8509 commit 1bb233e

File tree

9 files changed

+725
-138
lines changed

9 files changed

+725
-138
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
2+
.. _db.currentOp-global-index-ex:
3+
4+
Global Index Example
5+
~~~~~~~~~~~~~~~~~~~~
6+
7+
.. code-block:: javascript
8+
9+
{
10+
type: "op",
11+
desc: "GlobalIndex{Donor, Recipient, Coordinator}Service <globalIndexUUID}",
12+
op: "command",
13+
ns: "<database>.<collection>",
14+
originatingCommand: {
15+
createIndexes: "<database>.<collection>",
16+
key: <indexkeypattern>,
17+
unique: <boolean>,
18+
<Additional createIndexes options>
19+
},
20+
{donor, coordinator, recipient}State : "<service state>",
21+
approxDocumentsToScan: NumberLong(<count>),
22+
approxBytesToScan: NumberLong(<count>),
23+
bytesWrittenFromScan: NumberLong(<count>),
24+
countWritesToStashCollections: NumberLong(<count>),
25+
countWritesDuringCriticalSection : NumberLong(<count>),
26+
countReadsDuringCriticalSection: NumberLong(<count>),
27+
keysWrittenFromScan: NumberLong(<count>),
28+
remainingOperationTimeEstimatedSecs: NumberLong(<count>),
29+
allShardsLowestRemainingOperationTimeEstimatedSecs: NumberLong(<estimate>),
30+
allShardsHighestRemainingOperationTimeEstimatedSecs: NumberLong(<estimate>),
31+
totalCopyTimeElapsedSecs: NumberLong(<count>),
32+
totalCriticalSectionTimeElapsedSecs : NumberLong(<count>),
33+
totalOperationTimeElapsedSecs: NumberLong(<count>),
34+
}
35+
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
2+
.. _db.currentOp-resharding-ex:
3+
4+
Resharding Output Example
5+
~~~~~~~~~~~~~~~~~~~~~~~~~
6+
7+
.. code-block:: javascript
8+
9+
{
10+
type: "op",
11+
desc: "Resharding{Donor, Recipient, Coordinator}Service <reshardingUUID>",
12+
op: "command",
13+
ns: "<database>.<collection>",
14+
originatingCommand: {
15+
reshardCollection: "<database>.<collection>",
16+
key: <shardkey>,
17+
unique: <boolean>,
18+
collation: {locale: "simple"},
19+
// Other options to the reshardCollection command are omitted
20+
// to decrease the likelihood the output is truncated.
21+
},
22+
{donor, coordinator, recipient}State : "<service state>",
23+
approxDocumentsToCopy: NumberLong(<count>),
24+
approxBytesToCopy: NumberLong(<count>),
25+
bytesCopied: NumberLong(<count>),
26+
countWritesToStashCollections: NumberLong(<count>),
27+
countWritesDuringCriticalSection : NumberLong(<count>),
28+
countReadsDuringCriticalSection: NumberLong(<count>),
29+
deletesApplied: NumberLong(<count>),
30+
documentsCopied: NumberLong(<count>),
31+
insertsApplied: NumberLong(<count>),
32+
oplogEntriesFetched: NumberLong(<count>),
33+
oplogEntriesApplied: NumberLong(<count>),
34+
remainingOperationTimeEstimatedSecs: NumberLong(<count>),
35+
allShardsLowestRemainingOperationTimeEstimatedSecs: NumberLong(<estimate>),
36+
allShardsHighestRemainingOperationTimeEstimatedSecs: NumberLong(<estimate>),
37+
totalApplyTimeElapsedSecs: NumberLong(<count>),
38+
totalCopyTimeElapsedSecs: NumberLong(<count>),
39+
totalCriticalSectionTimeElapsedSecs : NumberLong(<count>),
40+
totalOperationTimeElapsedSecs: NumberLong(<count>),
41+
updatesApplied: NumberLong(<count>),
42+
}
43+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
These output samples illustrate ``currentOp`` output for particular
2+
operations. The fields that make up the actual output vary depending on
3+
the server's role.

source/reference/command/currentOp.txt

Lines changed: 112 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -206,13 +206,20 @@ The following example returns information on index creation operations:
206206
}
207207
)
208208

209-
210-
211209
Output Example
212210
--------------
213211

214212
.. include:: /includes/currentOp-output-example.rst
215213

214+
.. _currentOp-specific-output-examples:
215+
216+
Specific Output Examples
217+
------------------------
218+
219+
.. include:: /includes/metrics/txt-section-intro.rst
220+
.. include:: /includes/metrics/ex-resharding.rst
221+
.. include:: /includes/metrics/ex-global-index.rst
222+
216223
.. _currentOp-output-fields:
217224

218225
Output Fields
@@ -1106,7 +1113,7 @@ Output Fields
11061113

11071114
.. versionadded:: 4.2
11081115

1109-
.. data:: currentOp.totalOperationTimeElapsed
1116+
.. data:: currentOp.totalOperationTimeElapsedSecs
11101117

11111118
The total time elapsed, in seconds, for the current :ref:`resharding
11121119
operation <sharding-resharding>`. The time is set to 0 when a new
@@ -1116,7 +1123,19 @@ Output Fields
11161123

11171124
.. versionadded:: 5.0
11181125

1119-
.. data:: currentOp.remainingOperationTimeEstimated
1126+
Starting in MongoDB 6.1, this metric is also available on the
1127+
coordinator during resharding.
1128+
1129+
.. data:: currentOp.updatesApplied
1130+
1131+
The number of updates applied.
1132+
1133+
Only present on a recipient shard when a resharding operation is
1134+
taking place.
1135+
1136+
.. versionadded:: 6.1
1137+
1138+
.. data:: currentOp.remainingOperationTimeEstimatedSecs
11201139

11211140
The estimated time remaining in seconds for the current
11221141
:ref:`resharding operation <sharding-resharding>`. The time is set to
@@ -1127,6 +1146,29 @@ Output Fields
11271146

11281147
.. versionadded:: 5.0
11291148

1149+
Starting in MongoDB 6.1, this metric is also available on the
1150+
coordinator during resharding.
1151+
1152+
.. data:: currentOp.allShardsLowestRemainingOperationTimeEstimatedSecs
1153+
1154+
Calculated across all shards, the lowest estimate of the number of
1155+
seconds remaining.
1156+
1157+
Only present on a coordinator when a resharding operation is
1158+
taking place.
1159+
1160+
.. versionadded:: 6.1
1161+
1162+
.. data:: currentOp.allShardsHighestRemainingOperationTimeEstimatedSecs
1163+
1164+
Calculated across all shards, the highest estimate of the number of
1165+
seconds remaining.
1166+
1167+
Only present on a coordinator when a resharding operation is
1168+
taking place.
1169+
1170+
.. versionadded:: 6.1
1171+
11301172
.. data:: currentOp.approxDocumentsToCopy
11311173

11321174
The approximate number of documents to be copied from the donor
@@ -1185,7 +1227,57 @@ Output Fields
11851227

11861228
.. versionadded:: 5.0
11871229

1188-
.. data:: currentOp.totalCopyTimeElapsed
1230+
.. data:: currentOp.countWritesToStashCollections
1231+
1232+
The number of writes to the recipient :term:`stash collections
1233+
<stash collection>`.
1234+
1235+
Only present on a recipient shard when a resharding operation is
1236+
taking place.
1237+
1238+
.. versionadded:: 6.1
1239+
1240+
.. data:: currentOp.countWritesDuringCriticalSection
1241+
1242+
The number of writes attempted during the donor's critical
1243+
section.
1244+
1245+
Only present on a donor shard when a resharding operation is
1246+
taking place.
1247+
1248+
.. versionadded:: 6.1
1249+
1250+
.. data:: currentOp.countReadsDuringCriticalSection
1251+
1252+
The number of reads attempted during the donor's critical
1253+
section.
1254+
1255+
Only present on a donor shard when a resharding operation is
1256+
taking place.
1257+
1258+
.. versionadded:: 6.1
1259+
1260+
.. data:: currentOp.deletesApplied
1261+
1262+
The number of deletes applied to the temporary resharding collection.
1263+
Each oplog entry that involves a delete increments the counter by 1.
1264+
1265+
Only present on a recipient shard when a resharding operation is
1266+
taking place.
1267+
1268+
.. versionadded:: 6.1
1269+
1270+
.. data:: currentOp.insertsApplied
1271+
1272+
The number of inserts applied to the temporary resharding collection.
1273+
Each oplog entry that involves an insert increments the counter by 1.
1274+
1275+
Only present on a recipient shard when a resharding operation is
1276+
taking place.
1277+
1278+
.. versionadded:: 6.1
1279+
1280+
.. data:: currentOp.totalCopyTimeElapsedSecs
11891281

11901282
The total elapsed time, in seconds, for ongoing data copy tasks from
11911283
donor shards to recipient shards for the current :ref:`resharding
@@ -1197,6 +1289,9 @@ Output Fields
11971289

11981290
.. versionadded:: 5.0
11991291

1292+
Starting in MongoDB 6.1, this metric is also available on the
1293+
coordinator during resharding.
1294+
12001295
.. data:: currentOp.oplogEntriesFetched
12011296

12021297
The number of entries fetched from the :term:`oplog` for the current
@@ -1219,7 +1314,7 @@ Output Fields
12191314

12201315
.. versionadded:: 5.0
12211316

1222-
.. data:: currentOp.totalApplyTimeElapsed
1317+
.. data:: currentOp.totalApplyTimeElapsedSecs
12231318

12241319
The total elapsed time, in seconds, for the apply step of the
12251320
current :ref:`resharding operation <sharding-resharding>`. In the
@@ -1232,6 +1327,9 @@ Output Fields
12321327

12331328
.. versionadded:: 5.0
12341329

1330+
Starting in MongoDB 6.1, this metric is also available on the
1331+
coordinator during resharding.
1332+
12351333
.. data:: currentOp.countWritesDuringCriticalSection
12361334

12371335
The number of writes perfomed in the critical section for the current
@@ -1245,7 +1343,7 @@ Output Fields
12451343

12461344
.. versionadded:: 5.0
12471345

1248-
.. data:: currentOp.totalCriticalSectionTimeElapsed
1346+
.. data:: currentOp.totalCriticalSectionTimeElapsedSecs
12491347

12501348
The total elapsed time, in seconds, for the critical section of the
12511349
current :ref:`resharding operation <sharding-resharding>`. The
@@ -1258,6 +1356,9 @@ Output Fields
12581356

12591357
.. versionadded:: 5.0
12601358

1359+
Starting in MongoDB 6.1, this metric is also available on the
1360+
coordinator during resharding.
1361+
12611362
.. data:: currentOp.donorState
12621363

12631364
The current state of a donor shard for the :ref:`resharding operation
@@ -1429,30 +1530,9 @@ Output Fields
14291530

14301531
.. data:: currentOp.opStatus
14311532

1432-
The current state of a :ref:`resharding operation
1433-
<sharding-resharding>`.
1434-
1435-
Only present if a resharding operation is taking place. Once the
1436-
operation has completed, the operation is removed from ``currentOp``
1437-
output.
1438-
1439-
.. list-table::
1440-
:widths: 20 80
1441-
:header-rows: 1
1442-
1443-
* - State
1444-
- Description
1445-
1446-
* - ``actively running``
1447-
- The resharding operation is actively running.
1448-
1449-
* - ``success``
1450-
- The resharding operation has succeeded.
1533+
This metric is removed in version 6.1. For a list of new metrics that
1534+
replace and expand the reporting ``currentOp.opStatus`` provided,
1535+
see the :ref:`release notes <6.1-rel-notes-currentOp>`.
14511536

1452-
* - ``failure``
1453-
- The resharding operation has failed.
1537+
.. versionchanged:: 6.1
14541538

1455-
* - ``canceled``
1456-
- The resharding operation was canceled.
1457-
1458-
.. versionadded:: 5.0

0 commit comments

Comments
 (0)