dyno
dyno copied to clipboard
Connection health checking is not working for synchronous connection pool
Health checking for synchronous connection pool has been enabled in PR #112.
This mechanism doesn't actually work.
In ConnectionPoolHealthTracker, the method pingHostPool is executed periodically by a scheduler:
private void pingHostPool(HostConnectionPool<CL> hostPool) {
for (Connection<CL> connection : hostPool.getAllConnections()) {
try {
connection.execPing();
} catch (DynoException e) {
trackConnectionError(hostPool, e);
}
}
}
But, for synchronous connection pool, the HostConnectionPoolImpl.getAllConnections method throws an exception:
public Collection<Connection<CL>> getAllConnections() {
throw new RuntimeException("Not Implemented");
}