-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: manual
-
Labels:
-
0.5
There are expected situations where rs.printSlaveReplicationInfo() may return negative values. For example, consider a sequence is something like this:
12:00:00.00 Primary writes a no-op
12:01:00.00 Heartbeat updates secondary's view of primary – every 2s, I won't list them all
12:00:00.10 Secondary replicates no-op (nice fast system)
12:05:00.00 Primary takes a real write
12:05:00.10 Secondary replicates real write
12:10:00.00 Nothing, no-op is skipped
12:19:00.00 Heartbeat, secondary sees primary op time of 12:05:00
12:20:00.00 Primary writes a no-op
12:20:00.10 Secondary replicates no-op
— any replication status in here will get a -15s lag —
12:21:00.00 Heartbeat, secondary sees primary op time of 12:20:00
We should clarify that the lag reported by secondaries may not be representative of the cluster health (i.e. negative values do not indicate that the secondary is ahead of the primary). Additionally, we should clarify that it's generally advisable to run rs.printSlaveReplicationInfo() on the primary.
- documents
-
SERVER-34379 Primary is -1 Sec behind the primary
- Closed