[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: |