@@ -17,7 +17,7 @@ Definition
17
17
18
18
The ``replSetGetStatus`` command returns the status of the replica
19
19
set from the point of view of the server that processed the command.
20
- ``replSetGetStatus`` must be run against the :term:`admin database`.
20
+ ``replSetGetStatus`` must be run on the :term:`admin database`.
21
21
22
22
The :binary:`~bin.mongod` instance must be a replica set member for
23
23
:dbcommand:`replSetGetStatus` to return successfully.
@@ -47,9 +47,10 @@ The command has the following syntax:
47
47
(i.e. :replstate:`STARTUP2` state), the command returns
48
48
:data:`replSetGetStatus.initialSyncStatus` metrics.
49
49
50
- Once the member finishes its initial sync and transitions to
51
- another state, the :data:`replSetGetStatus.initialSyncStatus`
52
- metrics are no longer available.
50
+ After the member completes the initial synchronization and
51
+ transitions to another state, the
52
+ :data:`replSetGetStatus.initialSyncStatus` metrics are no longer
53
+ available.
53
54
54
55
- In earlier versions (3.6.x-4.2.0)
55
56
To return :ref:`initial sync <replica-set-initial-sync>` status
@@ -60,7 +61,7 @@ The command has the following syntax:
60
61
61
62
db.adminCommand( { replSetGetStatus: 1, initialSync: 1 } )
62
63
63
- The :data:`replSetGetStatus.initialSyncStatus` metrics remains
64
+ The :data:`replSetGetStatus.initialSyncStatus` metrics remain
64
65
available after the member completes its initial sync. That is,
65
66
you can run the :dbcommand:`replSetGetStatus` command with the
66
67
``initialSync: 1`` on the secondary member to return its initial
@@ -265,7 +266,7 @@ Example
265
266
266
267
The following example runs the :dbcommand:`replSetGetStatus`
267
268
command on the :term:`admin database` of the replica set
268
- secondary.
269
+ secondary:
269
270
270
271
.. code-block:: javascript
271
272
@@ -452,9 +453,9 @@ Example
452
453
453
454
db.adminCommand( { replSetGetStatus: 1 } )
454
455
455
- Once the member finishes its initial sync and transitions
456
- to another state, the
457
- :data:`replSetGetStatus.initialSyncStatus` document is no
456
+ After the member completes the initial synchronization and
457
+ transitions to another state, the
458
+ :data:`replSetGetStatus.initialSyncStatus` metrics are no
458
459
longer available.
459
460
460
461
In earlier versions (3.6.x-4.2.0)
@@ -684,7 +685,7 @@ following fields:
684
685
685
686
.. data:: replSetGetStatus.date
686
687
687
- An :term:`ISODate` formatted date and time that reflects the current
688
+ An :term:`ISODate` formatted date and time that contains the current
688
689
time according to the server that processed the
689
690
:command:`replSetGetStatus` command. Compare this to the values of
690
691
:data:`replSetGetStatus.members[n].lastHeartbeat` to find the
@@ -721,7 +722,7 @@ following fields:
721
722
722
723
The :data:`~replSetGetStatus.syncSourceId` field holds the
723
724
:data:`replSetGetStatus.members[n]._id` of the member from which
724
- this instance syncs .
725
+ this instance synchronizes .
725
726
726
727
If this instance is a primary,
727
728
:data:`~replSetGetStatus.syncSourceHost` is an empty string and
@@ -735,7 +736,7 @@ following fields:
735
736
736
737
.. versionadded:: 4.2.1
737
738
738
- The number that corresponds to the majority votes needed to elect a
739
+ The number of majority votes needed to elect a
739
740
new primary in an election.
740
741
741
742
.. data:: replSetGetStatus.writeMajorityCount
@@ -761,7 +762,7 @@ following fields:
761
762
.. versionadded:: 4.4
762
763
763
764
The number of *data-bearing* members configured with :rsconf:`votes:
764
- 1 <members[n].votes>`; that is, the count does not include arbiters.
765
+ 1 <members[n].votes>` (this does not include arbiters) .
765
766
766
767
.. data:: replSetGetStatus.optimes
767
768
@@ -786,9 +787,9 @@ following fields:
786
787
:data:`~replSetGetStatus.optimes.lastCommittedOpTime`.
787
788
788
789
The :data:`~replSetGetStatus.optimes.lastCommittedWallTime` may
789
- not accurately reflect
790
+ not accurately represent the
790
791
:data:`~replSetGetStatus.optimes.lastCommittedOpTime` if all
791
- members are not on MongoDB 4.2 or greater since the
792
+ members are not on MongoDB 4.2 or greater because the
792
793
:data:`~replSetGetStatus.optimes.lastCommittedWallTime`
793
794
requires communication with other members of the deployment.
794
795
@@ -811,9 +812,9 @@ following fields:
811
812
:data:`~replSetGetStatus.optimes.readConcernMajorityOpTime`.
812
813
813
814
The :data:`~replSetGetStatus.optimes.readConcernMajorityWallTime`
814
- may not accurately reflect
815
+ may not accurately represent the
815
816
:data:`~replSetGetStatus.optimes.readConcernMajorityOpTime` if
816
- all members are not on MongoDB 4.2 or greater since the
817
+ all members are not on MongoDB 4.2 or greater because the
817
818
:data:`~replSetGetStatus.optimes.readConcernMajorityWallTime`
818
819
requires communication with other members of the deployment.
819
820
@@ -872,7 +873,7 @@ following fields:
872
873
Metrics related to the election of the current primary.
873
874
:data:`~replSetGetStatus.electionCandidateMetrics` is only available
874
875
on the primary or a candidate for election. For a candidate, the
875
- metrics becomes unavailable once the candidate loses the election.
876
+ metrics are unavailable after the candidate loses the election.
876
877
877
878
.. data:: replSetGetStatus.electionCandidateMetrics.lastElectionReason
878
879
@@ -893,23 +894,23 @@ following fields:
893
894
In v4.2.1, ``electionTerm`` was named ``electionTerm``.
894
895
895
896
The member's election count (i.e. :data:`~replSetGetStatus.term`)
896
- at the time it called for the new election.
897
+ at the time it called the new election.
897
898
898
899
.. data:: replSetGetStatus.electionCandidateMetrics.lastCommittedOpTimeAtElection
899
900
900
901
.. versionadded:: 4.2.1
901
902
902
903
The most recent :data:`majority-committed optime
903
904
<replSetGetStatus.optimes.lastCommittedOpTime>`, as seen by this
904
- member, at the time it called for the new election.
905
+ member, at the time it called the new election.
905
906
906
907
.. data:: replSetGetStatus.electionCandidateMetrics.lastSeenOpTimeAtElection
907
908
908
909
.. versionadded:: 4.2.1
909
910
910
911
The member's most recent :data:`applied optime
911
912
<replSetGetStatus.optimes.appliedOpTime>` at the time it called
912
- for the new election.
913
+ the new election.
913
914
914
915
.. data:: replSetGetStatus.electionCandidateMetrics.numVotesNeeded
915
916
@@ -969,7 +970,7 @@ following fields:
969
970
970
971
The date and time at which the write concern
971
972
:writeconcern:`"majority"` became available after the election
972
- for the replica set(i.e. the date and time at which the ``new
973
+ for the replica set ( the date and time when the ``new
973
974
term`` oplog entry was majority committed).
974
975
975
976
.. data:: replSetGetStatus.electionParticipantMetrics
@@ -996,14 +997,15 @@ following fields:
996
997
997
998
.. data:: replSetGetStatus.electionParticipantMetrics.lastVoteDate
998
999
999
- An :term:`ISODate` formatted date string that reflects when the
1000
+ An :term:`ISODate` formatted date string that records when the
1000
1001
participant voted.
1001
1002
1002
1003
.. versionadded:: 4.2.2
1003
1004
1004
1005
.. data:: replSetGetStatus.electionParticipantMetrics.electionCandidateMemberId
1005
1006
1006
- The :rsconf:`members[n]._id` of the candidate calling the election.
1007
+ The :rsconf:`members[n]._id` of the candidate calling the
1008
+ election.
1007
1009
1008
1010
.. versionadded:: 4.2.2
1009
1011
@@ -1062,38 +1064,30 @@ following fields:
1062
1064
1063
1065
.. data:: replSetGetStatus.initialSyncStatus
1064
1066
1065
-
1066
1067
A document that provides information on the progress and status of
1067
1068
:ref:`initial sync <replica-set-initial-sync>` on this member.
1068
1069
1069
1070
.. include:: /includes/fact-rs-status-init-sync-availability.rst
1070
1071
1071
1072
.. data:: replSetGetStatus.initialSyncStatus.failedInitialSyncAttempts
1072
1073
1073
-
1074
1074
The number of times the :ref:`initial sync
1075
1075
<replica-set-initial-sync>` failed and had to restart on this
1076
1076
member.
1077
1077
1078
-
1079
1078
.. data:: replSetGetStatus.initialSyncStatus.maxFailedInitialSyncAttempts
1080
1079
1081
-
1082
1080
The maximum number of times the :ref:`initial sync
1083
1081
<replica-set-initial-sync>` can restart on this member before
1084
1082
the member shuts down.
1085
1083
1086
-
1087
1084
.. data:: replSetGetStatus.initialSyncStatus.initialSyncStart
1088
1085
1089
-
1090
1086
The start timestamp of the :ref:`initial sync
1091
1087
<replica-set-initial-sync>` for this member.
1092
1088
1093
-
1094
1089
.. data:: replSetGetStatus.initialSyncStatus.initialSyncEnd
1095
1090
1096
-
1097
1091
The end timestamp of the :ref:`initial sync
1098
1092
<replica-set-initial-sync>` for this member.
1099
1093
@@ -1103,10 +1097,8 @@ following fields:
1103
1097
:data:`~replSetGetStatus.initialSyncStatus.initialSyncStart` and
1104
1098
:data:`~replSetGetStatus.initialSyncStatus.initialSyncEnd`.
1105
1099
1106
-
1107
1100
.. data:: replSetGetStatus.initialSyncStatus.initialSyncAttempts
1108
1101
1109
-
1110
1102
Array of documents where each document corresponds to a single
1111
1103
:ref:`initial sync <replica-set-initial-sync>` attempt. For example:
1112
1104
@@ -1168,10 +1160,8 @@ following fields:
1168
1160
See also
1169
1161
:data:`~replSetGetStatus.initialSyncStatus.failedInitialSyncAttempts`.
1170
1162
1171
-
1172
1163
.. data:: replSetGetStatus.initialSyncStatus.appliedOps
1173
1164
1174
-
1175
1165
The number of ops that occurred after the :ref:`initial sync
1176
1166
<replica-set-initial-sync>` started and were applied after cloning
1177
1167
the databases.
@@ -1180,10 +1170,8 @@ following fields:
1180
1170
to update its data set to reflect the current state of the
1181
1171
replica set.
1182
1172
1183
-
1184
1173
.. data:: replSetGetStatus.initialSyncStatus.initialSyncOplogStart
1185
1174
1186
-
1187
1175
The start timestamp of the oplog application stage of the
1188
1176
:ref:`initial sync <replica-set-initial-sync>` where the
1189
1177
member applies changes that occurred after the initial sync
@@ -1193,10 +1181,8 @@ following fields:
1193
1181
to update its data set to reflect the current state of the
1194
1182
replica set.
1195
1183
1196
-
1197
1184
.. data:: replSetGetStatus.initialSyncStatus.initialSyncOplogEnd
1198
1185
1199
-
1200
1186
The end timestamp of the oplog application stage of the
1201
1187
:ref:`initial sync <replica-set-initial-sync>` where the
1202
1188
member applies changes that occurred after the initial sync
@@ -1206,7 +1192,6 @@ following fields:
1206
1192
to update its data set to reflect the current state of the
1207
1193
replica set.
1208
1194
1209
-
1210
1195
.. data:: replSetGetStatus.initialSyncStatus.syncSourceUnreachableSince
1211
1196
1212
1197
The date and time at which the sync source became unreachable.
@@ -1239,7 +1224,6 @@ following fields:
1239
1224
1240
1225
.. data:: replSetGetStatus.initialSyncStatus.databases.databasesCloned
1241
1226
1242
-
1243
1227
Number of databases cloned during :ref:`initial sync
1244
1228
<replica-set-initial-sync>`.
1245
1229
@@ -1434,8 +1418,8 @@ following fields:
1434
1418
1435
1419
.. data:: replSetGetStatus.members[n].health
1436
1420
1437
- A number that indicates if the member is up (i.e. ``1``) or down
1438
- (i.e. ``0``).
1421
+ A number that indicates if the member is up (``1``) or down
1422
+ (``0``).
1439
1423
1440
1424
.. data:: replSetGetStatus.members[n].state
1441
1425
@@ -1448,12 +1432,14 @@ following fields:
1448
1432
1449
1433
.. data:: replSetGetStatus.members[n].uptime
1450
1434
1451
- The :data:`~replSetGetStatus.members[n].uptime` field holds a value
1452
- that reflects the number of seconds that this member has been
1453
- online.
1454
-
1455
- This value does not appear for the member that returns the
1456
- :method:`rs.status()` data.
1435
+ For the member on which the :dbcommand:`replSetGetStatus` command
1436
+ is run, :data:`~replSetGetStatus.members[n].uptime` is the
1437
+ the number of seconds the member has been online.
1438
+
1439
+ For the other members, :data:`~replSetGetStatus.members[n].uptime`
1440
+ is the number of seconds the member has been in continuous
1441
+ communication with the member on which the
1442
+ :dbcommand:`replSetGetStatus` command was run.
1457
1443
1458
1444
.. data:: replSetGetStatus.members[n].optime
1459
1445
@@ -1484,17 +1470,17 @@ following fields:
1484
1470
1485
1471
.. data:: replSetGetStatus.members[n].optimeDate
1486
1472
1487
- An :term:`ISODate` formatted date string that reflects the last
1473
+ An :term:`ISODate` formatted date string that contains the last
1488
1474
entry from the :term:`oplog` that this member applied. If this
1489
1475
differs significantly from
1490
1476
:data:`~replSetGetStatus.members[n].lastHeartbeat` this member is
1491
1477
either experiencing "replication lag" *or* there have not been any
1492
- new operations since the last update. Compare
1478
+ new operations after the last update. Compare
1493
1479
``members.optimeDate`` between all of the members of the set.
1494
1480
1495
1481
.. data:: replSetGetStatus.members[n].optimeDurableDate
1496
1482
1497
- An :term:`ISODate` formatted date string that reflects the last
1483
+ An :term:`ISODate` formatted date string that contains the last
1498
1484
entry from the :term:`oplog` that this member applied to its
1499
1485
journal.
1500
1486
@@ -1520,13 +1506,13 @@ following fields:
1520
1506
.. data:: replSetGetStatus.members[n].electionDate
1521
1507
1522
1508
For the current primary, an :term:`ISODate` formatted date string
1523
- that reflects the election date. See
1509
+ that contains the election date. See
1524
1510
:doc:`/core/replica-set-high-availability` for more information about
1525
1511
elections.
1526
1512
1527
1513
.. data:: replSetGetStatus.members[n].lastHeartbeat
1528
1514
1529
- An :term:`ISODate` formatted date and time that reflects the last
1515
+ An :term:`ISODate` formatted date and time that contains the last
1530
1516
time the server that processed the :command:`replSetGetStatus`
1531
1517
command received a response from a heartbeat that it sent to this
1532
1518
member (``members[n]``).
@@ -1538,7 +1524,7 @@ following fields:
1538
1524
1539
1525
.. data:: replSetGetStatus.members[n].lastHeartbeatRecv
1540
1526
1541
- An :term:`ISODate` formatted date and time that reflects the last
1527
+ An :term:`ISODate` formatted date and time that contains the last
1542
1528
time the server that processed the :command:`replSetGetStatus`
1543
1529
command received a heartbeat request from this member
1544
1530
(``members[n]``).
0 commit comments