-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
About transaction availability #100
Comments
This was referenced Sep 9, 2020
Closed
👍 |
JohannesHoppe
added a commit
that referenced
this issue
Oct 17, 2020
…ensures transaction is ready thanks @mihevc thanks @realLiangshiwei fixes #86 fixes #89 fixes #100
New version released. Please try out Mongo2Go 2.2.13. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Mongo2Go is a great library, but we found some problems when using.
The document explains to use single server replica set mode to enable transactions, but after testing I think it is invalid.
Test code is very simple:
The result:
I see that you use the
transition to primary complete; database writes are now permitted
message to determine whether the transaction is available, but this is not enough.Mongo2Go/src/Mongo2Go/Helper/MongoDbProcessStarter.cs
Line 50 in 958b052
This is the code for mongo driver to determine whether the transaction is available
https://github.com/mongodb/mongo-csharp-driver/blob/44fff3f7d618ade5eed7a3e874407ecbc231997c/src/MongoDB.Driver.Core/Core/Bindings/CoreSession.cs#L461
I think we can use the same logic
Now, it works:
What do you think?
The text was updated successfully, but these errors were encountered: