[CSHARP-2561] StartTransaction should throw an exception if transactions are not supported Created: 25/Mar/19  Updated: 28/Oct/23  Resolved: 17/Apr/19

Status: Closed
Project: C# Driver
Component/s: Transactions
Affects Version/s: 2.8.0
Fix Version/s: 2.8.1

Type: Improvement Priority: Major - P3
Reporter: Robert Stam Assignee: Robert Stam
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by DRIVERS-624 Ensure 4.0 drivers return an error wh... Implementing

 Description   

As per DRIVERS-624 if StartTransaction is called and the current topology and/or server version does not support transactions an exception must be thrown.

Note that StartTransaction cannot block, but that should be OK because the application must call client.StartSession before calling session.StartTransaction, and StartSession does block until the necessary cluster information is available.



 Comments   
Comment by Robert Stam [ 17/Apr/19 ]

Not sure why the commit to master didn't get automatically mentioned, but here it is:

https://github.com/mongodb/mongo-csharp-driver/commit/bb4830a2dac9a10f1dfe7e112aa51b7991420a1f

 

Comment by Githook User [ 17/Apr/19 ]

Author:

{'email': 'robert@robertstam.org', 'name': 'rstam', 'username': 'rstam'}

Message: CSHARP-2561: Changes for the v2.8.x branch.
Branch: v2.8.x
https://github.com/mongodb/mongo-csharp-driver/commit/9d4d4112ee04a7147cfa329b7a784b1b79ae7dc2

Comment by Githook User [ 17/Apr/19 ]

Author:

{'email': 'robert@robertstam.org', 'name': 'rstam', 'username': 'rstam'}

Message: CSHARP-2561: StartTransaction should throw an exception when transactions are not supported.
Branch: v2.8.x
https://github.com/mongodb/mongo-csharp-driver/commit/cf3d3e3cc993116f24ee85829806d5768a90bb1c

Generated at Wed Feb 07 21:42:53 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.