Details
-
Bug
-
Status: Backlog
-
Major - P3
-
Resolution: Unresolved
-
None
-
None
-
None
-
Storage Execution
-
ALL
-
Execution Team 2023-06-12
Description
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.
Attachments
Issue Links
- is related to
-
SERVER-69462 Lock acquisitions won't aways obey the OpContext's deadline or interruption
-
- Backlog
-
-
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
-