[SERVER-70916] Remove unnecessary acquisition of mutex from access blocker registry method Created: 27/Oct/22 Updated: 29/Oct/23 Resolved: 07/Nov/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.2.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Christopher Caplinger | Assignee: | Christopher Caplinger |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Operating System: | ALL | ||||
| Sprint: | Server Serverless 2022-10-31, Server Serverless 2022-11-14 | ||||
| Participants: | |||||
| Linked BF Score: | 128 | ||||
| Description |
|
TenantMigrationAccessBlockerRegistry::getAsyncBlockingOperationsExecutor() currently attempts to acquire the registry mutex in order to access _asyncBlockingOperationsExecutor. This can lead to a deadlock with TenantMigrationRecipientAccessBlocker or TenantMigrationDonorAccessBlocker, since these classes call back into the registry. Ideally, we should avoid calling back into the registry from members of the registry, but refactoring this and moving _asyncBlockingOperationsExecutor is non-trivial at this point. Instead, since _asyncBlockingOperationsExecutor is created when the registry is instantiated and reset only when it is shut down/destroyed, we can avoid synchronization entirely for this executor. |
| Comments |
| Comment by Githook User [ 04/Nov/22 ] |
|
Author: {'name': 'Christopher Caplinger', 'email': 'christopher.caplinger@mongodb.com', 'username': 'UnicodeSnowman'}Message: |