[CSHARP-2822] StartTransaction doesn't throw an exception when connected to Standalone nodes Created: 29/Oct/19  Updated: 28/Oct/23  Resolved: 21/Apr/20

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: 2.8.1
Fix Version/s: 2.11.0

Type: Bug Priority: Minor - P4
Reporter: Tomasz Masternak Assignee: Robert Stam
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The driver does not throw an exception on StartTransaction when connecting to a Standalone or Unknown node. This is connected to CSHARP-2561 where the check was introduced.

However, the check misses these two scenarios. This results in an exception being thrown at a later stage when transaction operations are being executed. 

Note 2020-04-20: It is not necessary to check for Unknown because in that case the server is also disconnected and we filter out disconnected servers before checking server type.



 Comments   
Comment by Githook User [ 21/Apr/20 ]

Author:

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

Message: CSHARP-2822: StartTransaction doesn't throw an exception when connected to Standalone nodes.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/44fff3f7d618ade5eed7a3e874407ecbc231997c

Comment by Githook User [ 21/Apr/20 ]

Author:

{'name': 'Tomek Masternak', 'email': 'tomasz.masternak@particular.net', 'username': 'tmasternak'}

Message: CSHARP-2822: StartTransaction throws for Standalone and Unknown servers
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/02322bc8c7680c0e0dd74557bf573acdde5a3dd5

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