[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: |
| 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? |