-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Catalog and Routing
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.
- split from
-
SERVER-89730 All commands that take more than one collection lock must acquire locks in same order
- Closed