dyno icon indicating copy to clipboard operation
dyno copied to clipboard

Connection health checking is not working for synchronous connection pool

Open rprevot opened this issue 7 years ago • 0 comments

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");
}

rprevot avatar Apr 30 '18 14:04 rprevot