[SERVER-41866] Reverse mutex acquisition order in CatalogCache::_scheduleDatabaseRefresh Created: 21/Jun/19 Updated: 29/Oct/23 Resolved: 08/Jul/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 4.0.10, 4.2.0-rc1 |
| Fix Version/s: | 4.0.11, 4.2.0-rc3, 4.3.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Randolph Tan | Assignee: | Kaloian Manassiev |
| 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 | ||||||||
| Backport Requested: |
v4.2, v4.0
|
||||||||
| Sprint: | Sharding 2019-07-15 | ||||||||
| Participants: | |||||||||
| Description |
|
CatalogCache::_mutex -> ShardServerCatalogCacheLoader::_mutex order: CatalogCache::_scheduleDatabaseRefresh has catalog cache mutex and calls getDatabase: which will take the ShardServerCCL _mutex at the beginning of the call. ShardServerCCL::_mutex -> CatalogCache::_mutex order: Inside the async task lamda we take the ShardServerCCL mutex then tries to run a callback: And the callback tries to get the CatalogCache::_mutex: |
| Comments |
| Comment by Githook User [ 09/Jul/19 ] |
|
Author: {'name': 'Kaloian Manassiev', 'email': 'kaloian.manassiev@mongodb.com', 'username': 'kaloianm'}Message: (cherry picked from commit 75dc5684d4c6be0e8ac7c653f5389df9f45f1baf) |
| Comment by Githook User [ 09/Jul/19 ] |
|
Author: {'name': 'Kaloian Manassiev', 'email': 'kaloian.manassiev@mongodb.com', 'username': 'kaloianm'}Message: (cherry picked from commit 75dc5684d4c6be0e8ac7c653f5389df9f45f1baf) |
| Comment by Githook User [ 08/Jul/19 ] |
|
Author: {'name': 'Kaloian Manassiev', 'username': 'kaloianm', 'email': 'kaloian.manassiev@mongodb.com'}Message: |