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

Outcome enlistment handle leak in OletxTransactionManager #22

Closed
swh-cb opened this issue Jun 24, 2022 · 5 comments
Closed

Outcome enlistment handle leak in OletxTransactionManager #22

swh-cb opened this issue Jun 24, 2022 · 5 comments
Assignees

Comments

@swh-cb
Copy link
Contributor

swh-cb commented Jun 24, 2022

After the transaction has been completed or aborted, the outcome enlistment handle in OletxTransactionManager must be released again.

@swh-cb swh-cb self-assigned this Jun 24, 2022
@swh-cb swh-cb added this to the 1.5.0 milestone Jul 6, 2022
@caviyacht
Copy link

@swh-cb , Is this project still active? We are currently upgrading to .NET 6 and I would like to utilize this library, but was concerned with a potential leak. Is this leak a huge issue, or just something that needs to be cleaned up?

@swh-cb
Copy link
Contributor Author

swh-cb commented Feb 1, 2023

The issue must be fixed but does not affect productive use of the library.

We still use the library in our products targeting .NET 6 without problems. Once .NET 8 is released with long term support (LTS), we will probably switch back to System.Transactions. .NET 7 added distributed transaction support for Windows only (dotnet/runtime#72051). However, you need the latest version of Microsoft.Data.SqlClient to avoid deadlocks with MSSQL (dotnet/SqlClient#1801). If an Oracle database is to participate in the transaction, the OletxCompatibilityLoadContext is still required in combination with the unmanaged ODP.NET driver Oracle.DataAccess. There is an open feature request for distributed transaction support in ODP.NET Core on .NET 7 and Windows (oracle/dotnet-db-samples#267).

@caviyacht
Copy link

@swh-cb , Thanks for responding so quickly. Ok, so sounds like we should be good to use this (I believe). We will be on .NET 6 for the foreseeable future (tied to a 3rd party framework).

We are using the latest version of System.Data.SqlClient (v4.8.5). I was wondering, the Sql patch logic that you recommend ( MsSqlPatcher.Patch(typeof(SqlConnection).Assembly);), is that still needed for this version as well? I'm going to assume yes.

@swh-cb
Copy link
Contributor Author

swh-cb commented Feb 1, 2023

@caviyacht Exactly, System.Data.SqlClient needs to be patched, even for the latest version 4.8.5. The fix from dotnet/SqlClient#1624 for Microsoft.Data.SqlClient was not backported. We are currently using the (patched) version 4.1.0 of Microsoft.Data.SqlClient in our environments.

@swh-cb
Copy link
Contributor Author

swh-cb commented Apr 3, 2024

This issue won't be fixed because distributed transactions are supported on Windows starting with .NET 7.0.

@swh-cb swh-cb closed this as not planned Won't fix, can't repro, duplicate, stale Apr 3, 2024
@swh-cb swh-cb removed this from the 1.5.0 milestone Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants