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

Revert "Recycle NpgsqlTransaction" (#2416) #2617

Merged
merged 1 commit into from Sep 11, 2019

Conversation

roji
Copy link
Member

@roji roji commented Sep 11, 2019

This reverts commit 7b8e117 (issue #2416) for 4.1, which made us recycle transaction instances on a connector.

  • As part of transaction recycling, NpgsqlTransaction.IsCompleted was made internal, since the transaction instance will be revived, IsCompleted will switch from true to false, leading to potential confusion/dangerous behavior. This was a problem for at least one user ([4.1.0] experience report updating Marten #2607).
  • Even with transaction recycling, it's still possible to expose an IsCompleted property that would only be valid until the instance is disposed. However, currently there's no requirement to dispose NpgsqlTransaction - the moment a transaction is committed or rolled back, a new one can be started again. Changing that would be an even bigger breaking change.

Note that the commit remains in dev for 5.0, where we should decide on the exact behavior we want, opened #2618 to track.

@roji roji merged this pull request into release/4.1 Sep 11, 2019
@delete-merged-branch delete-merged-branch bot deleted the RevertTransactionRecycle branch September 11, 2019 15:12
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.

None yet

2 participants