-
Type:
Bug
-
Status: Closed
-
Priority:
Major - P3
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 4.1.11
-
Component/s: Replication
-
Labels:None
-
Backwards Compatibility:Fully Compatible
-
Operating System:ALL
-
Sprint:Repl 2019-04-22, Repl 2019-05-06, Repl 2019-05-20
-
Linked BF Score:30
It is illegal to acquire new locks while holding open an oplog slot, since it can cause the deadlock described inĀ SERVER-35367. We do this in a few places when writing transaction oplog entries:
When preparing a transaction, we reserve oplog slots here or here, then stash the locker here or here, then take a global lock here or here.
When aborting a prepared transaction, we reserve an oplog slot here, then release locksĀ here, then take a global lock here.
When committing a prepared transaction, we reserve an oplog slot here, then release locks here, then take a global lock here.
(Note that the global lock acquisition for writing oplog entries for unprepared transaction commit is not a problem, since the locker is already holding the global lock.)
- is duplicated by
-
SERVER-40522 OplogSlotReserver must take a global IX lock
-
- Closed
-
- is related to
-
SERVER-35367 Hold locks in fewer callers of waitForAllEarlierOplogWritesToBeVisible()
-
- Closed
-
-
SERVER-36534 Don't acquire locks on oplog when writing oplog entries
-
- Closed
-
- related to
-
SERVER-40522 OplogSlotReserver must take a global IX lock
-
- Closed
-