You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Environment
Windows 11
JDK 1.8.0-381
Spring-parent 2.7.13
r2dbc-mysql 0.9.3
Describe the bug
I've been stucked with an bug recently, and I search anywhere on GitHub but nothing.
Here is an issue that very close to answer. pgjdbc/r2dbc-postgresql#661
So I wrote an issue under this repo.
It's quit simple. Update something in database transaction, throw an exception if the updated rows is not 1(always true because it's not exists). 2 update statements are triggled by Flux parallel.
So, I believe something must not compatible with cancel in reactor and spring-tx.
Another thing confusing me is, why the number of r2dbc_pool_acquired_connections always 9.
Environment
Windows 11
JDK 1.8.0-381
Spring-parent 2.7.13
r2dbc-mysql 0.9.3
Describe the bug
I've been stucked with an bug recently, and I search anywhere on GitHub but nothing.
Here is an issue that very close to answer. pgjdbc/r2dbc-postgresql#661
So I wrote an issue under this repo.
It's quit simple. Update something in
database transaction
, throw an exception if the updated rows is not 1(always true because it's not exists). 2 update statements are triggled byFlux
parallel.The funny thing is, when I change
.doOnNext
to another block(attention on)
), it's works as expected.So, I believe something must not compatible with
cancel in reactor
andspring-tx
.Another thing confusing me is, why the number of
r2dbc_pool_acquired_connections
always9
.To Reproduce
https://github.com/1528110566/r2dbc-connection-leak-demo
This is a demo that can reproduce this bug.
r2dbc_pool_acquired_connections
andr2dbc_pool_idle_connections
. We'll find the number of connection in the pool is not as expected. This can be proved with debugging on https://github.com/r2dbc/r2dbc-pool/blob/bf6540eee26aa55bba4cb6ab0c6a3c622524679c/src/main/java/io/r2dbc/pool/ConnectionPool.java#L106. We'will find the number of connection is actually smaller than expected.The text was updated successfully, but these errors were encountered: