querydsl icon indicating copy to clipboard operation
querydsl copied to clipboard

R2DBC connection not released back to the pool

Open mozguletz opened this issue 1 year ago • 2 comments

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?

mozguletz avatar Mar 20 '24 22:03 mozguletz

@mozguletz uuuups.

My bad.

Are you able to submit a pull request fixing it?

Cheers

velo avatar Apr 09 '24 13:04 velo

@velo @mozguletz I'll try to fix it.

xeounxzxu avatar Jul 07 '24 04:07 xeounxzxu

Seems no one is working on this, I'm closing to clear the board. Feel free to reopen after a PR is submitted.

velo avatar Oct 18 '24 11:10 velo