Skip to content

Commit 64f7c0e

Browse files
jeff-allen-mongokay-kim
authored andcommitted
DOCS-10359 - Adding point about negative values for printSlaveReplicationInfo()
1 parent bce8088 commit 64f7c0e

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

source/reference/method/rs.printSlaveReplicationInfo.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,19 @@ A :ref:`delayed member <replica-set-delayed-members>` may show as ``0``
4141
seconds behind the primary when the inactivity period on the primary is
4242
greater than the :rsconf:`members[n].slaveDelay`
4343
value.
44+
45+
A member may show a negative time value behind the primary when
46+
:method:`rs.printSlaveReplicationInfo()` is called. This behavior is
47+
expected if the method is called after a secondary replicates a write
48+
following a period of inactivity, but before it has received a
49+
heartbeat from the primary with its latest optime.
50+
51+
.. note::
52+
53+
The lag reported by secondaries may not be representative of cluster
54+
health. Negative values do not indicate that the secondary is ahead
55+
of the primary.
56+
57+
For the most up-to-date information on your replica set, it is
58+
generally advisable to run
59+
:method:`rs.printSlaveReplicationInfo()` on the primary.

0 commit comments

Comments
 (0)