[SERVER-77342] Avoid advancing vector clock twice in primary write path Created: 22/May/23  Updated: 29/Oct/23  Resolved: 23/May/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.0-rc0

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

Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2023-05-29
Participants:

 Description   

We advance the VectorClock twice in the primary write path, which requires taking the hot _newOpMutex and the VectorClock's mutex.

On the primary, we advance the VectorClock initially when we allocate our optimes. We advance the VectorClock again in the onCommit handler that runs after the write commits. This is done through the call to ReplicationCoordinatorExternalState::setGlobalTimestamp and setNewTimestamp.



 Comments   
Comment by Githook User [ 23/May/23 ]

Author:

{'name': 'Louis Williams', 'email': 'louis.williams@mongodb.com', 'username': 'louiswilliams'}

Message: SERVER-77342 Avoid advancing vector clock twice in primary write path
Branch: master
https://github.com/mongodb/mongo/commit/eb548b3822e1a53224a13c7b6c96395dfb6a7afc

Generated at Thu Feb 08 06:35:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.