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 savepoint bugs #21698

Merged
merged 1 commit into from
Jul 20, 2020
Merged

Fix savepoint bugs #21698

merged 1 commit into from
Jul 20, 2020

Conversation

roji
Copy link
Member

@roji roji commented Jul 20, 2020

  • Check that DbConnection is Open before attempting to rollback and/or release a savepoint, and swallow any exceptions that bubble up from those operations.
    • Swallowed exceptions are logged, currently with Debug level - the idea is that the main exception is going to typically explain why any savepoint operation failed anyway, so users shouldn't be too interested in this. Open to changing this though.
  • Call close on IRelationalConnection after releasing savepoint to make sure open/close are balanced.

Closes #21340

* Check that DbConnection is Open before attempting to rollback and/or
  release a savepoint, and swallow (log) any exceptions that bubble up
  from those operations.
* Call close on IRelationalConnection after releasing savepoint to make
  sure open/close are balanced.

Closes #21340
@roji roji merged commit 385291f into master Jul 20, 2020
@roji roji deleted the SavepointExceptions branch July 20, 2020 20:08
roji added a commit that referenced this pull request Jul 25, 2020
* Check that DbConnection is Open before attempting to rollback and/or
  release a savepoint, and swallow (log) any exceptions that bubble up
  from those operations.
* Call close on IRelationalConnection after releasing savepoint to make
  sure open/close are balanced.

Closes #21340

(cherry picked from commit 385291f)
roji added a commit that referenced this pull request Jul 25, 2020
* Check that DbConnection is Open before attempting to rollback and/or
  release a savepoint, and swallow (log) any exceptions that bubble up
  from those operations.
* Call close on IRelationalConnection after releasing savepoint to make
  sure open/close are balanced.

Closes #21340

(cherry picked from commit 385291f)
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.

Savepoints should not be be rolled back/released if the connection is closed
2 participants