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

Recycle NpgsqlTransaction #2427

Merged
merged 1 commit into from May 15, 2019
Merged

Recycle NpgsqlTransaction #2427

merged 1 commit into from May 15, 2019

Conversation

roji
Copy link
Member

@roji roji commented Apr 10, 2019

Since PostgreSQL only supports on transaction on a given connection, we reycle the NpgsqlTransaction object.

Closes #2416

@YohDeadfall @austindrenski the lifecycle changes here aren't exactly trivial, so I'd appreciate a good review. In the end I think the logic is actually simplified, since the NpgsqlTransaction's state simply mirrors the connector's TransactionStatus (except for disposal, which is still managed on the NpgsqlTransaction since it's user-controlled).

Copy link
Contributor

@YohDeadfall YohDeadfall left a comment

Choose a reason for hiding this comment

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

Nice to see some code cleanup as an addition to the changes.

@austindrenski
Copy link
Contributor

@roji Could you rebase this when you have a chance?

Copy link
Contributor

@austindrenski austindrenski left a comment

Choose a reason for hiding this comment

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

In the end I think the logic is actually simplified

Definitely agree, nice work on this @roji!

Since PostgreSQL only supports on transaction on a given connection,
we reycle the NpgsqlTransaction object.

Closes npgsql#2416
@roji roji merged commit 7b8e117 into npgsql:dev May 15, 2019
@roji roji deleted the RecycleTransaction branch May 15, 2019 01:39
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.

Recycle NpgsqlTransaction
3 participants