[SERVER-71400] Investigate using a shared mutex for ReplicationCoordinatorImpl Created: 16/Nov/22  Updated: 05/Dec/22  Resolved: 28/Nov/22

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

Type: Improvement Priority: Major - P3
Reporter: Jordi Olivares Provencio Assignee: Backlog - Replication Team
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-71478 Add method for knowing if we are a pr... Open
Assigned Teams:
Replication
Participants:

 Description   

During a PR discussion it was brought to light that users of ReplicationCoordinator are trying to work around methods that take the _mutex lock on the belief that it is a heavily contended mutex.

As most of the time the operations performed are read operations (all const methods for example) it could be of interest to explore the usage of a shared_mutex.

The only problem this could cause is with write-starvation. An option to tackle this is to set a preference on Linux via pthread_rwlockattr_setkind_np.


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