-
Notifications
You must be signed in to change notification settings - Fork 314
Closed
Labels
By Design 🎨Issues due to driver feature design and will not be fixed.Issues due to driver feature design and will not be fixed.
Description
@leo12chandu commented on Fri Aug 24 2018
Issue Title
Multiple Sqlconnections with Same connectionstring enlisting into distributed transaction.
General
When I open 2 SqlConnections as below and enlist each of them in the same committable transaction, it enlists as a distributed transaction. I would've thought if its the same connection string, we don't need to enlist as distributed transaction.
As a side note, distributed transactions are not supported in .NET Core as of 2.1. they seem to throw PlatformNotSupportedException(). Do you have plans of providing something similar to MSDTC in the future that works on linux boxes too? or is there other recommendations for alternatives to MSDTC to run with distributed transactions in .net core?
Code to reproduce:-
TransactionOptions options = new TransactionOptions();
options.IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted;
options.Timeout = TransactionManager.MaximumTimeout;
var tran = CommittableTransaction(options);
using (SqlConnection connection = GetSqlConnection("cn1"))
{
connection.Open();
connection.EnlistTransaction(tran);
}
using (SqlConnection connection = GetSqlConnection("cn1"))
{
connection.Open();
connection.EnlistTransaction(tran);
}
tran.Commit();
leedonhyun, Lindvorn, paresh-paresh, JustinCreasy, ans-ashkan and 6 more
Metadata
Metadata
Assignees
Labels
By Design 🎨Issues due to driver feature design and will not be fixed.Issues due to driver feature design and will not be fixed.