Skip to content

Conversation

alex-kulakov
Copy link
Contributor

Suggested fix #77

The fix is applied only for SQL Server. The PR checks whether transaction is became zombie before commit or rollback. This happens when some exception appeared and rolled back existing transaction (in this case an attempt to rollback to save point when DbReader is active).

User will have original exception (e.g. inability to perform rollback to save point due to open reader) instead of overlapping exception from outermost TransactionScope.Dispose()

Copy link
Contributor

@AlexUstinov AlexUstinov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really actual only for the MSSQL provider?

@alex-kulakov
Copy link
Contributor Author

alex-kulakov commented Feb 1, 2021

The #77 issue appears only for MS SQL. I have tried to run the tests on other supported RDBMS.

If we speak about checking connection in general then I couldn't find any error with similar symptoms in other RDBMSs to add it as a test. Having DbTransaction.Connection set to null when connection is corrupted is not general behavior so I think we will fix it later if something shows up for other providers.

@alex-kulakov alex-kulakov merged commit c3f8cc4 into master Mar 22, 2021
@alex-kulakov alex-kulakov deleted the master-zombie-transaction-rollback-commit branch May 17, 2021 13:51
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

Successfully merging this pull request may close these issues.

Attempt to rollback already closed transaction
2 participants