[SERVER-37352] Replace AuthorizationManager's _privilegeDocsExist with an atomic Created: 27/Sep/18  Updated: 29/Oct/23  Resolved: 24/Oct/18

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

Type: Improvement Priority: Major - P3
Reporter: Spencer Jackson Assignee: Patrick Freed
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Security 2018-10-22, Security 2018-11-05
Participants:

 Description   

We could avoid having a mutex and managing locking if the AuthorizationManager tracked an atomic bool rather than possessing a bool and a mutex.



 Comments   
Comment by Githook User [ 24/Oct/18 ]

Author:

{'name': 'Patrick Freed', 'email': 'patrick.freed@mongodb.com', 'username': 'patrickfreed'}

Message: SERVER-37352 Replace AuthorizationManager's _privilegeDocsExist with an atomic
Branch: master
https://github.com/mongodb/mongo/commit/03438832409e501f7bfc79e7dd2ee3257ccbdfc7

Comment by Spencer Jackson [ 27/Sep/18 ]

We could dropĀ a mutex. _privilegeDocsExistMutex is only used to protect _privilegeDocsExist. I think we can make _privilegeDocsExist an atomic bool, and drop _privilegeDocsExistMutex.

Comment by Andy Schwerin [ 27/Sep/18 ]

You mean we could remove the mutex from the AuthMgr entirely?

Generated at Thu Feb 08 04:45:45 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.