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

Fix | Avoid enlistment of pooled connection in aborted transaction #543

Merged
merged 9 commits into from May 1, 2020

Conversation

cheenamalhotra
Copy link
Member

@cheenamalhotra cheenamalhotra commented Apr 27, 2020

Fixes #237 by dooming the connection when transaction ends externally (re-created PR #495) .

As of now, this fix is promising and does not send connection back to connection pool, hence avoiding enlistment in aborted transaction.

Alternatively, if we want to send connection back to pool, it needs to be in same state as any other connection in pool with no aborted transaction reference, but that doesn't seem likely to be achieved without complex changes in the driver that would also be a risky attempt. Investigations are in progress that will bring back same performance, but in order to address the issue on priority, I would propose this fix in the driver for end user application consistency.

Co-Authored-By: David Engel <dengel@magnitude.com>
…t/SqlDelegatedTransaction.cs

Co-Authored-By: David Engel <dengel@magnitude.com>
@cheenamalhotra cheenamalhotra added this to In progress in SqlClient v2.0.0 via automation Apr 28, 2020
@cheenamalhotra cheenamalhotra added this to the 2.0.0-preview3 milestone Apr 28, 2020
@cheenamalhotra cheenamalhotra moved this from In progress to Review in progress in SqlClient v2.0.0 Apr 28, 2020
SqlClient v2.0.0 automation moved this from Review in progress to Reviewer approved Apr 30, 2020
@cheenamalhotra cheenamalhotra merged commit 0af9f32 into dotnet:master May 1, 2020
SqlClient v2.0.0 automation moved this from Reviewer approved to Done May 1, 2020
@ramonsmits
Copy link

@cheenamalhotra will this fix also be backported?

@cheenamalhotra
Copy link
Member Author

cheenamalhotra commented May 1, 2020

We are going to backport the fix to M.D.S v1.1 and System.Data.SqlClient in .NET Core, while for .NET Framework, @saurabh500 can confirm if this could be considered?

@ramonsmits
Copy link

ramonsmits commented May 1, 2020

The original issue was found in .net framework. It seems to me this needs backporting to .net framework too.

Edit: Sorry, 1.1.* is targeting .net framework.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

SqlException: The PROMOTE TRANSACTION request failed because there is no local transaction active
4 participants