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

Restore connection context if exception happens during rollback or commit #1796

Merged
merged 4 commits into from
Dec 3, 2024

Conversation

henadzit
Copy link
Contributor

@henadzit henadzit commented Dec 2, 2024

Description

Fixes the issue where if an exception happens during a rollback or commit, the connection context is not properly restored leading to having TransactionWrapper where regular connections are supposed to be. This would also cause connections not properly recycled in the case of database downtime.

Motivation and Context

This should fix #1793 and fix #1604

How Has This Been Tested?

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added the changelog accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@henadzit henadzit force-pushed the fix/transaction-recovery branch from 59ac2b9 to 5ef0fbf Compare December 2, 2024 11:15
@henadzit henadzit requested a review from abondar December 2, 2024 11:30
@coveralls
Copy link

Pull Request Test Coverage Report for Build 12118174684

Details

  • 21 of 21 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.002%) to 90.392%

Totals Coverage Status
Change from base Build 12116630665: 0.002%
Covered Lines: 6314
Relevant Lines: 6879

💛 - Coveralls

@henadzit henadzit merged commit 57c9ead into tortoise:develop Dec 3, 2024
7 checks passed
@henadzit henadzit mentioned this pull request Dec 8, 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
3 participants