[CDRIVER-4227] Use a shared_mutex when locking in shared_ptr atomic operations Created: 12/Nov/21  Updated: 28/Oct/23  Resolved: 17/Nov/21

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 1.20.0

Type: Improvement Priority: Major - P3
Reporter: Colby Pike Assignee: Colby Pike
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
causes CDRIVER-4233 error: implicit declaration of functi... Closed
Related
related to CDRIVER-4249 Undeclared DNS constants and symbols ... Closed
Epic Link: Improve multi-threaded perf

 Description   

At very high thread counts, locking on the shared_ptr atomic mutex begins to dominate. Using a shared_mutex significantly reduces the time spent in locking code and increases the performance under high contention.



 Comments   
Comment by Githook User [ 17/Nov/21 ]

Author:

{'name': 'vector-of-bool', 'email': 'vectorofbool@gmail.com', 'username': 'vector-of-bool'}

Message: CDRIVER-4227 Add a shared_mutex, and use it when locking in shared_ptr atomic operations (#895)

  • Add a shared_mutex, and use it when locking in shared_ptr atomic operations

Tag CDRIVER-4002

Co-authored-by: Kevin Albertson <kevin.albertson@10gen.com>

  • Force enable more recent POSIX APIs, regardless of language mode

This change only applies to private code, and does not expose any
changes in the public API.

  • No reallocf in strict POSIX mode

Co-authored-by: Kevin Albertson <kevin.albertson@10gen.com>
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/8d1af19aa067818044d5f52039ae2c761dad3168

Generated at Wed Feb 07 21:20:19 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.