Details
-
Improvement
-
Resolution: Unresolved
-
Minor - P4
-
None
-
None
-
Not Needed
Description
Summary
- https://github.com/mongodb/specifications/blob/master/source/max-staleness/max-staleness.rst#lastwrite confusingly describes lastWriteDate as "the wall-clock time of the primary when it most recently recorded a write to the oplog". lastWriteDate is a wall-clock time read from the last oplog entry in the node that responded to "hello", regardless of whether that node is primary or secondary. While technically this value indeed was a reading of the wall clock of the primary node at some point (because only the primary node creates oplog enties), it is read from the local oplog when a secondary responds to hello, and not from the primary oplog, which is how the current description may be interpreted.
- It may also be helpful to link to the relevant official documentation https://www.mongodb.com/docs/manual/reference/command/hello/#mongodb-data-hello.lastWrite.
Motivation
Who is the affected end user?
Any spec reader.
How does this affect the end user?
The current description confuses readers. Here is a thread started by john.page@mongodb.com as a result of the current description: https://mongodb.slack.com/archives/C0UDE2DL6/p1692201093620479.
How likely is it that this problem or use case will occur?
I am guessing, that it is not likely, as I don't think many people read this spec.
If the problem does occur, what are the consequences and how severe are they?
Someone will be confused again, maybe will have to spend time thinking about it or asking questions.
Is this issue urgent?
Not urgent, no deadline.
Is this ticket required by a downstream team?
No.
Is this ticket only for tests?
This improvement affects neither implementations, nor tests.
Acceptance Criteria
The descriptions of lastWrite.lastWriteDate/opTime are clear and correct, and if possible, don't look alien when compared with the descriptions in the official docs.