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

R2DBC connection not released back to the pool #352

Open
mozguletz opened this issue Mar 20, 2024 · 1 comment
Open

R2DBC connection not released back to the pool #352

mozguletz opened this issue Mar 20, 2024 · 1 comment

Comments

@mozguletz
Copy link

mozguletz commented Mar 20, 2024

Existing implementation of AbstractR2DBCQuery.fetch() and unsafeCount() takes an existing connection from the connection provider and uses it, in case if a connection pool is used, the connections are never closed

return getConnection() .flatMapMany( conn -> { ...});

A way to handle the close connection (returning it to the pool)

return Flux.usingWhen(getConnection(), conn -> { ...}, Connection::close);

Is there a way to close the connection from the connection provider in case if a connection pool is used?

@velo
Copy link
Member

velo commented Apr 9, 2024

@mozguletz uuuups.

My bad.

Are you able to submit a pull request fixing it?

Cheers

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