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

Transaction leak in transform_stream #1401

Closed
levkk opened this issue Apr 10, 2024 · 0 comments
Closed

Transaction leak in transform_stream #1401

levkk opened this issue Apr 10, 2024 · 0 comments
Assignees
Labels
bug Something isn't working sdk

Comments

@levkk
Copy link
Contributor

levkk commented Apr 10, 2024

I'm seeing this in Postgres logs when using transform_stream:

WARNING:  there is no transaction in progress

which tells me there is a synchronization issue between the SQLx client and the server. It attempts to solve that by issuing a rollback and that's the warning that pops up. I'm guessing this has something to do with the Stream implementation for the Transaction, but I haven't been able to trace it. The transaction is probably getting dropped (or leaked).

Imo if we can we should simplify that implementation a bit, maybe by defining less standard-compliant iterators and more custom ones that we manually iterate on using while let Some(v) = stream_iterator.next().await.

@levkk levkk added bug Something isn't working sdk labels Apr 10, 2024
@levkk levkk closed this as completed May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sdk
Projects
None yet
Development

No branches or pull requests

2 participants