[SERVER-43871] Use a monotonic clock source in prepare conflict tracker Created: 07/Oct/19  Updated: 29/Oct/23  Resolved: 16/Oct/19

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.3.1

Type: Improvement Priority: Major - P3
Reporter: Haley Connelly Assignee: Haley Connelly
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2019-10-21
Participants:
Linked BF Score: 9

 Description   

curTimeMicros64() is not a reliable time source for the prepare conflict tracker. 

Motivation: 

PrepareConflictTracker::endPrepareConflict throws an invariant when curTime, computed with curTimeMicros64(), is less than _prepareConflictStartTime (also computed with curTimeMicros64() )

Previously: we saw that curTime, when converted into Unix epoch time, correctly matched the time the invariant message was logged. However, _prepareConflictStart time, converted into Unix epoch time, was a future time that had not occurred yet. 

 



 Comments   
Comment by Githook User [ 16/Oct/19 ]

Author:

{'name': 'Haley Connelly', 'username': 'haleyConnelly', 'email': 'haley.connelly@10gen.com'}

Message: SERVER-43871 Use a monotonic clock source in prepare conflict tracker
Branch: master
https://github.com/mongodb/mongo/commit/fbdd5712f9ff6714f5ce9804eb4e9decb25dd88b

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