[SERVER-48668] Make TickSourceMock class thread safe Created: 09/Jun/20  Updated: 29/Oct/23  Resolved: 11/Jun/20

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 4.7.0

Type: Bug Priority: Major - P3
Reporter: Tommaso Tocci Assignee: Tommaso Tocci
Resolution: Fixed Votes: 0
Labels: sharding-wfbf-day, thread-sanitizer
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2020-06-15
Participants:
Linked BF Score: 0

 Description   

In order to avoid data race while accessing TickSourceMock's class api concurrently by multiple threads, the _currentTicks class variable access need to be serialized through the usage of some thread syncronization primitive such as mutex.



 Comments   
Comment by Githook User [ 11/Jun/20 ]

Author:

{'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}

Message: SERVER-48668 Make TickSourceMock class thread safe
Branch: master
https://github.com/mongodb/mongo/commit/a1c1d823c09afe06ce3418298dd71b5266d6c4f6

Comment by Tommaso Tocci [ 10/Jun/20 ]

Probing EVG patch with the use of std::atomic

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