[SERVER-37487] Aborting a prepared transaction must not respect maxTransactionLockMillis Created: 05/Oct/18  Updated: 29/Oct/23  Resolved: 05/Oct/18

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 4.1.4

Type: Bug Priority: Major - P3
Reporter: Tess Avitabile (Inactive) Assignee: Tess Avitabile (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2018-10-08
Participants:
Linked BF Score: 61

 Description   

When abortActiveTransaction() is called from prepareTransaction(), it should not use maxTransactionLockMillis for its lock acquisitions, since writing the abort oplog entry must always succeed. However, this is only safe if the thread is not holding any locks, since otherwise it could self-deadlock. Thus the order of operations for abortActiveTransaction() should be:

  • Reserve oplog slot.
  • Abort storage transaction and reset locker.
  • Write abort oplog entry.


 Comments   
Comment by Githook User [ 05/Oct/18 ]

Author:

{'name': 'Tess Avitabile', 'email': 'tess.avitabile@mongodb.com', 'username': 'tessavitabile'}

Message: SERVER-37487 Aborting a prepared transaction must not respect maxTransactionLockMillis
Branch: master
https://github.com/mongodb/mongo/commit/2db04b524dc5e2121b74829814db7c8e84e5696d

Comment by Tess Avitabile (Inactive) [ 05/Oct/18 ]

We also rely on the fact that abortActiveTransaction() must not throw for a prepared transaction here.

Generated at Thu Feb 08 04:46:08 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.