[SERVER-56428] Replace usage of atomic_load/atomic_store of shared_ptr with mutex Created: 28/Apr/21  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Henrik Edin Assignee: Backlog - Storage Execution Team
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Assigned Teams:
Storage Execution
Participants:

 Description   

The loose atomic_load/atomic_store functions for shared_ptr are implemented over a global pool of 16 mutexes on Linux and a single mutex on Windows.

This leads to unrelated shared_ptr stores may use the same mutex and create contention for each other. It is better to protect this with our own mutex until we have std::atomic_shared_ptr in C++20.



 Comments   
Comment by Henrik Edin [ 28/Jan/22 ]

Removing from current sprint as we don't have C++20 yet.

Comment by Connie Chen [ 29/Apr/21 ]

We can switch to atomic_shared_ptr when we move to C++20

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