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

TransactionBuilder::start Future dropped before completion #1120

Open
wquark opened this issue Mar 20, 2024 · 3 comments
Open

TransactionBuilder::start Future dropped before completion #1120

wquark opened this issue Mar 20, 2024 · 3 comments

Comments

@wquark
Copy link

wquark commented Mar 20, 2024

batch_execute submits the creation of the transaction (https://github.com/sfackler/rust-postgres/blob/master/tokio-postgres/src/transaction_builder.rs#L109), but the Transaction object itself may never be constructed in case the future is dropped.

f6189a9 fixed it for Client::transaction.

@sfackler
Copy link
Owner

Good find. We should probably implement transaction with TransactionBuilder to avoid having two places that need to deal with this.

@wquark
Copy link
Author

wquark commented Mar 20, 2024

Makes sense. Anything else you need from my end? Is this something you'd knock out quickly or would you rather have a PR?

@sfackler
Copy link
Owner

Either way!

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

No branches or pull requests

2 participants