[SERVER-80980] remove lock in VectorClock::isEnabled Created: 12/Sep/23  Updated: 24/Jan/24  Resolved: 18/Jan/24

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

Type: Task Priority: Major - P3
Reporter: Mark Benvenuto Assignee: David Dominguez Sal
Resolution: Fixed Votes: 0
Labels: oldshardingemea, perf-8.0, perf-tiger, perf-tiger-handoff, perf-tiger-poc, perf-tiger-q4, shardingemea-qw
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-82647 Avoid getting current VectorClock in ... Closed
Assigned Teams:
Catalog and Routing
Backwards Compatibility: Fully Compatible
Sprint: CAR Team 2024-01-22
Participants:
Story Points: 2

 Description   

A lock is taken in VectorClock::isEnabled to check if VectorClock is enabled. It appears that VectorClock can only ever be disabled if a node becomes an arbiter and cannot be renabled. Since VectorClock::isEnabled is called several times in a request (gossipIn during request processing, gossipOut during reply processing and potentially over times (like getting legacy runtime constants)). This will help reduce contention on the VectorClock mutex and save time.



 Comments   
Comment by Githook User [ 17/Jan/24 ]

Author:

{'name': 'david-dominguez-sal', 'email': '97509688+david-dominguez-sal@users.noreply.github.com', 'username': 'david-dominguez-sal'}

Message: SERVER-80980: Substitute mutex usage by atomic in VectorClock (#18090)

GitOrigin-RevId: 778287175a14c70adec1e0766d746c5d3da46438
Branch: master
https://github.com/mongodb/mongo/commit/469a06bbf72dd3b9e85801f252c39e0a3d13ea75

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