Skip to content
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

Support System.Transactions #13

Closed
bgrainger opened this issue Jun 30, 2016 · 5 comments
Closed

Support System.Transactions #13

bgrainger opened this issue Jun 30, 2016 · 5 comments
Assignees
Milestone

Comments

@bgrainger
Copy link
Member

@bgrainger bgrainger commented Jun 30, 2016

On desktop (full) .NET, implement support for auto-enlisting in ambient transactions. This will enable .NET 4.5 code that uses TransactionScope to be ported to this connector without having to rewrite it. (This connector will throw when #12 is implemented, even if the underlying platform could support System.Transactions.)

See related issues for EF: dotnet/efcore#1530, dotnet/efcore#5595.

Note that System.Transactions isn't supported in .NET Core: dotnet/corefx#2949

@bgrainger
Copy link
Member Author

@bgrainger bgrainger commented Jul 29, 2016

It appears that System.Transactions is coming to .NET Core dotnet/corefx#10089 so implementing this will be useful for all platforms.

@bgrainger
Copy link
Member Author

@bgrainger bgrainger commented Apr 14, 2017

MySQL XA Transactions may be a good way to implement TransactionScope.

@bgrainger bgrainger added this to the 1.0 milestone Apr 14, 2017
bgrainger added a commit to bgrainger/MySqlConnector that referenced this issue Apr 15, 2017
@bgrainger bgrainger self-assigned this Apr 15, 2017
@bgrainger bgrainger changed the title Support System.Transactions on desktop Support System.Transactions Apr 15, 2017
@bgrainger
Copy link
Member Author

@bgrainger bgrainger commented Apr 15, 2017

Implemented in 0.18.0.

@sidhoda
Copy link

@sidhoda sidhoda commented May 4, 2017

@bgrainger is there still the possibility this could be implemented without XA transactions, like MySql.Data? Some of the restrictions with XA make it look less attractive option, particularly if running MySQL prior to 5.7.7 and using replication: https://dev.mysql.com/doc/refman/5.7/en/xa-restrictions.html

@bgrainger
Copy link
Member Author

@bgrainger bgrainger commented May 4, 2017

It's possible; I've created #254 to track it. If this is affecting you, could you please add a comment there to describe the specific issues you're running into? (MySQL 5.7.9 was the first GA release, so I'm not extremely concerned about limitations/errors in 5.7.x versions prior to that.)

I'm open to receiving a PR that implements a non-XA implementation of IEnlistmentNotification in order to support TransactionScope without using XA transactions.

An alternative of course is to explicitly use BeginTransaction/Commit in client code that doesn't want distributed transactions (which is a core feature of TransactionScope and part of the point of using it in the first place).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants