-
Notifications
You must be signed in to change notification settings - Fork 292
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
Fix | TransactionScope connection issue when Enlist is enable, Pooling is disabled and network connection type is Redirect #1960
Fix | TransactionScope connection issue when Enlist is enable, Pooling is disabled and network connection type is Redirect #1960
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #1960 +/- ##
==========================================
- Coverage 69.72% 69.66% -0.06%
==========================================
Files 306 306
Lines 61563 61563
==========================================
- Hits 42923 42889 -34
- Misses 18640 18674 +34
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 13 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
I find it strange that we do have a test for SqlClient/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/TransactionTest/TransactionTest.cs Line 52 in 1bcdb23
|
The test specifically doesn't run against Azure SQL because Azure SQL used to not support distributed transactions. I think it does now, via elastic transactions. So we probably just need to remove the |
…g is disabled and network connection type is Redirect (dotnet#1960)
…g is disabled and network connection type is Redirect (dotnet#1960)
We found that there was a bug when using a SQL Managed Instance and Azure SQL DB when the connection type is set from
proxy
toredirect
where in the connection stringpooling = false
andenlist=true
would result inFailed: Error Code: 10054 - A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)
. By adding a check to ensureRoutingInfo
is null beforeEnlist
is called, it resolves the issue.