r2dbc / r2dbc-pool

Connection Pooling for Reactive Relational Database Connectivity
https://r2dbc.io
Apache License 2.0
331 stars 55 forks source link

Could r2dbc pool provide a method/function to query connection infos in current pool? #215

Open CennyMo opened 1 month ago

CennyMo commented 1 month ago

Feature Request

hopes to provide a method named getConnectionInfos() in ConnectionPool.class or PoolMetrics.class, which could return all connection info in current pool, and the connection info includes ip, port, and status(such as idle, close or running).

Is your feature request related to a problem? Please describe

When we performing pressure test (about 10tps) at r2dbc-mysql client, the database server shutdown and switches master to slave, and all the requests timeout after database has recovered. The exception throws by r2dbc-pool is "Connection acquisition timed out". We guess the connections may stuck in query when database shut down, and fail to be released. However, we have no means to check the status of these connections, which makes it difficult to locate the bugs.