-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Concurrency
-
None
-
Storage Execution
-
Fully Compatible
-
ALL
-
Execution Team 2023-06-12, Execution EMEA Team 2023-06-26, Execution EMEA Team 2023-07-10, Execution EMEA Team 2023-07-24, Execution EMEA Team 2023-08-21, Execution EMEA Team 2023-09-04, Execution EMEA Team 2023-09-18, Execution EMEA Team 2023-10-02
-
146
There are multiple lock manager RAII classes which take both OperationContext and Locker (or both) and it looks like there exists at least one case where the behaviour of locking differs based on whether locker is passed directly or not.
For example, if we remove the Locker-only constructor of ResourceLock, this invariant starts getting hit reliably. The condition to check for the invariant doesn't get reached if opCtx is nullptr (which is what happens if we use the locker-only constructor).
Having such differentiation is dangerous and error-prone and we should get rid of it.
Architecturally, the OpContext and the Locker are complementary with each other. The OpContext is necessary for the "OS-like" utilities such as interruption, deadline, the operation's settings, transactional state, etc and the Locker is just the container for the currently-acquired locks.
- depends on
-
SERVER-78438 acquireCollectionsOrViews should leave snapshot open if in WUOW
- Closed
-
SERVER-79176 Index build _completeExternalAbort should be resilient to interrupts
- Closed
-
SERVER-79186 Make createSystemIndexes support interruption instead of fasserting
- Closed
- is duplicated by
-
SERVER-69462 Lock acquisitions won't always obey the OpContext's deadline or interruption
- Closed
- is related to
-
SERVER-69462 Lock acquisitions won't always obey the OpContext's deadline or interruption
- Closed
-
SERVER-69523 Allow METADATA and MUTEX locks to be acquired while holding an oplog hole
- Closed
-
SERVER-69727 Make ResourceLock acquisitions in the PersistentTaskQueue interruptible
- Closed