[SERVER-54909] In replSetGetStatus, report last durable and last applied operation wall times for all members Created: 03/Mar/21  Updated: 29/Oct/23  Resolved: 28/Oct/21

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 5.2.0, 4.4.11, 5.0.5, 5.1.1

Type: Improvement Priority: Major - P3
Reporter: Andy Schwerin Assignee: Vesselina Ratcheva (Inactive)
Resolution: Fixed Votes: 0
Labels: former-quick-wins
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Documented
is documented by DOCS-14906 Investigate changes in SERVER-54909: ... Closed
Related
related to SERVER-40353 Add wall clock time corresponding to ... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.1, v5.0, v4.4, v4.2
Sprint: Repl 2021-10-18, Repl 2021-11-01
Participants:
Case:

 Description   

Beginning in 4.2, MongoDB records the wall clock time at which the primary processes each operation with millisecond granularity and records the value in the oplog. Secondary nodes report these values back to the primary node when the issue replSetUpdatePosition, and the information is duly recorded in the TopologyCoordinator's data structure of member data.

If we went a step further and reported these values in the output of replSetGetStatus, it would be possible to calculate and report the primary's estimate of each secondary's replication lag in milliseconds. Presently, the optime is used to approximate this calculation, but it only has whole-second granularity, and due to monotonicity requirements can be incorrect for a long time after a clock adjustment on the primary node.

So, we should add, to each element of the members field returned in replSetGetStatus's response, that member's most recently reported last durable and last applied operation wall clock timestamps.



 Comments   
Comment by Githook User [ 19/Nov/21 ]

Author:

{'name': 'Vesselina Ratcheva', 'email': 'vesselina.ratcheva@10gen.com', 'username': 'vessy-mongodb'}

Message: SERVER-54909 Report last durable and last applied operation wall times for all members in replSetGetStatus

(cherry picked from commit 0cceba6f04b95f3652de84c2f1f4ab2a644dba6e)
Branch: v4.4
https://github.com/mongodb/mongo/commit/157a20b50ab984e0e7431b18dd42b0c7f0d356fa

Comment by Githook User [ 19/Nov/21 ]

Author:

{'name': 'Vesselina Ratcheva', 'email': 'vesselina.ratcheva@10gen.com', 'username': 'vessy-mongodb'}

Message: SERVER-54909 Report last durable and last applied operation wall times for all members in replSetGetStatus

(cherry picked from commit 0cceba6f04b95f3652de84c2f1f4ab2a644dba6e)
Branch: v5.0
https://github.com/mongodb/mongo/commit/dc90da4fb0d8fb7eab538362118f1d3c06b01b4d

Comment by Githook User [ 19/Nov/21 ]

Author:

{'name': 'Vesselina Ratcheva', 'email': 'vesselina.ratcheva@10gen.com', 'username': 'vessy-mongodb'}

Message: SERVER-54909 Report last durable and last applied operation wall times for all members in replSetGetStatus

(cherry picked from commit 0cceba6f04b95f3652de84c2f1f4ab2a644dba6e)
Branch: v5.1
https://github.com/mongodb/mongo/commit/bc125b9010c623aed2c3da49b4cbd809a4c3a865

Comment by Githook User [ 27/Oct/21 ]

Author:

{'name': 'Vesselina Ratcheva', 'email': 'vesselina.ratcheva@10gen.com', 'username': 'vessy-mongodb'}

Message: SERVER-54909 Report last durable and last applied operation wall times for all members in replSetGetStatus
Branch: master
https://github.com/mongodb/mongo/commit/0cceba6f04b95f3652de84c2f1f4ab2a644dba6e

Generated at Thu Feb 08 05:34:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.