[SERVER-34441] Error when aborting/committing a nonexistent txn or starting a txn with one running Created: 12/Apr/18  Updated: 29/Oct/23  Resolved: 18/May/18

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 4.0.0-rc0

Type: Task Priority: Major - P3
Reporter: Spencer Brody (Inactive) Assignee: Pavithra Vetriselvan
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-34388 Continue converting snapshot reads te... Closed
Duplicate
is duplicated by SERVER-34339 Aggregation error aborts the transact... Closed
Problem/Incident
Related
related to SERVER-34434 Shell should ignore errors in abortTr... Closed
Backwards Compatibility: Fully Compatible
Sprint: Repl 2018-04-23, Repl 2018-05-07, Repl 2018-05-21
Participants:
Linked BF Score: 28

 Description   

For example, right now if you start a transaction, then start another transaction, the shell allows that. Drivers will raise an error.

We should also error when abortTransaction or commitTransaction is called when no transaction is running on the current session.



 Comments   
Comment by Githook User [ 18/May/18 ]

Author:

{'username': 'pvselvan', 'name': 'Pavi Vetriselvan', 'email': 'pvselvan@umich.edu'}

Message: SERVER-34441 error when aborting or commiting a nonexistent txn and starting a txn with one running
Branch: master
https://github.com/mongodb/mongo/commit/4b4f53f64a5b364b74c92b0d10f6716b40c80b4d

Comment by Githook User [ 18/May/18 ]

Author:

{'username': 'pvselvan', 'name': 'Pavi Vetriselvan', 'email': 'pvselvan@umich.edu'}

Message: Revert "SERVER-34441 error when aborting or commiting a nonexistent txn and starting a txn with one running"

This reverts commit 1c3d79e1c8eccb4fbc57f7a43e165b3f5b9409f0.
Branch: master
https://github.com/mongodb/mongo/commit/b639a8a2b0b037dcf5407683e1698cec3a246fad

Comment by Githook User [ 17/May/18 ]

Author:

{'email': 'pvselvan@umich.edu', 'username': 'pvselvan', 'name': 'Pavi Vetriselvan'}

Message: SERVER-34441 error when aborting or commiting a nonexistent txn and starting a txn with one running
Branch: master
https://github.com/mongodb/mongo/commit/1c3d79e1c8eccb4fbc57f7a43e165b3f5b9409f0

Comment by Siyuan Zhou [ 17/Apr/18 ]

To be more specific,

  1. startTransaction should raise an error if this session is already in a transaction.
  2. Both commitTransaction and abortTransaction raise an error if this session has no transaction.
  3. When commitTransaction and abortTransaction commands raise an error, the transaction's state should be changed to inactive.
Generated at Thu Feb 08 04:36:42 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.