[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: |
|
||||
| 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: |
| Comment by Tommaso Tocci [ 10/Jun/20 ] |
|
Probing EVG patch with the use of std::atomic |