-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Catalog and Routing
-
Fully Compatible
-
CAR Team 2025-01-20, CAR Team 2025-02-03
-
200
-
3
Per SERVER-89730, a thread can acquire locks out of order, which can result in a deadlock. This could occur due to raw lock acquisitions, or due to multiple calls to acquisition APIs, which would individually acquire locks in order, but can break the ordering across acquisition calls.
This ticket is to enforce at runtime that a thread/opCtx locks namespaces in-order (e.g. in ResourceId order), independent of the APIs used to acquire the lock. Depending on the runtime cost, this may be a debug build-only check. We should also consider extending this guardrail to DDL locks.
- causes
-
SERVER-99926 Address disabling of runtime lock ordering checks in OplogApplierImplTest
-
- Open
-
- duplicates
-
SERVER-94876 Add global lock ordering check to avoid lock-free reads taking a normal lock
-
- Closed
-
- is related to
-
SERVER-100043 convertToCapped takes locks in a non-ResourceId order
-
- Closed
-
-
SERVER-100388 Fix lock ordering with ChangeCollectionsWriterInternal
-
- Closed
-
-
SERVER-100600 Magic restore unnecessarily keeps a collection acquired
-
- Closed
-
-
SERVER-99621 Fix lock ordering on renames
-
- Investigating
-
-
SERVER-99703 Investigate if we can remove a lock ordering conflict in ShardServerOpObserver
-
- Open
-
-
SERVER-99704 Investigate if we can remove a lock ordering conflict in RangeDeleterServiceOpObserver
-
- Open
-
-
SERVER-99706 Investigate if there's a lock ordering conflict in IndexBuildsCoordinatorMongod
-
- Open
-
-
SERVER-99708 Investigate potential lock ordering conflict in ShardingCatalogManager
-
- Open
-
-
SERVER-99709 Investigate if there's a lock ordering issue in ReplicaSetNodeProcessInterface
-
- Open
-
-
SERVER-99711 Investigate canonical ordering of locks during yield/restore
-
- Backlog
-
-
SERVER-99702 Delete ShardingWriteRouter class
-
- Backlog
-
-
SERVER-100505 Add TSAN annotations to our custom locks
-
- Backlog
-
- split from
-
SERVER-89730 All commands that take more than one collection lock must acquire locks in same order
-
- Closed
-