-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Concurrency, Sharding
-
None
-
Fully Compatible
-
ALL
-
137
The changes from a383a13 as part of SERVER-69434 changed DatabaseShardingState to construct a ResourceId(RESOURCE_MUTEX, dbName). Constructing a RESOURCE_MUTEX ResourceId outside of ResourceIdFactory is a violation of ResoureceIdFactory::nameForId(). The RESOURCE_MUTEX ResourceType is a lock type designed to use the position within the ResoureceIdFactory::labels vector as the hash of the ResourceId. ResourceId(RESOURCE_MUTEX, dbName) will take the hash of the database name and therefore be very unlikely to correspond to an element within the ResoureceIdFactory::labels vector.
ResourceId::toString() is called when the lock cannot be acquired within the allotted time and leads to an uncaught std::out_of_range exception.
- depends on
-
SERVER-70198 Use one single RESOURCE_MUTEX to protect concurrent operations on DatabaseShardingState for all databases
- Closed
-
SERVER-70610 Move the DatabaseShardingState RESOURCE_MUTEXes to the DatabaseShardingStateMap
- Closed
- is caused by
-
SERVER-69434 Make the DSS acquisition a RAII
- Closed
- is depended on by
-
SERVER-70467 Prevent manually using RESOURCE_MUTEX
- Closed
- is related to
-
SERVER-70322 BalancerStatsRegistry inappropriately constructs ResourceId outside ResourceIdFactory
- Closed
-
SERVER-70536 Invalid construction of "checkpoint" ResourceId outside ResourceIdFactory
- Closed
- related to
-
SERVER-70431 Checkpointing manually constructs ResourceId using RESOURCE_MUTEX
- Closed