-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 3.7.9
-
Component/s: None
-
None
-
Fully Compatible
-
ALL
-
Storage NYC 2018-05-07, Storage NYC 2018-05-21
It is possible for the transaction timeout periodic task to block on aborting a transaction, while attempting to acquire a database lock. The following is one scenario where this can happen:
- Two transactions are opened for a given collection
- A collection client cursor is opened for each and MODE_IX database and collection locks are acquired
- A drop database command is executed which requests a MODE_X database lock. This request is blocked on both transactions MODE_IX lock
- After one minute, the transaction timeout periodic task runs:
- An attempt is made to abort the first transaction. Transaction resources (locks and WiredTiger transaction) are freed.
- killCursors is called to kill the client cursor. The cursor kill attempt requires a MODE_IS lock which is blocked by the MODE_X request. The MODE_X request is still blocked by the second transactions MODE_IX lock.
- At this point unless transaction 2 is committed or aborted by the user, it will continue to block the database drop. The transaction timeout periodic runner will not timeout the second transaction as it is blocked on killing cursors for the first transaction.
- Additionally the MODE_X lock will block any further user operations on the database.
Performing transaction timeout with a 0-second lock acquisition timeout would address the above scenario. On failing to kill cursors for transaction 1 it would proceed with killing transaction 2. This would unblock the database drop and allow other operations to run.
- depends on
-
SERVER-33244 Make all lock acquisitions for transactions have 0 second timeout
- Closed
- is related to
-
SERVER-34732 collection drop hangs in test of transactions
- Closed