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
Describe the issue
Currently the HostStatus.ConnectFail status is being set on following exceptions attempting to obtain connection:
ConnectException
IOException
SQLException
See ConnectionFactoryImpl#openConnectionImpl method. Setting this status the host is excluded from the hosts list for a certain number of seconds (hostRecheckSeconds property).
The problem that some error codes doesn't mean the host needs to be marked as unavailable. The example is 53300 - that means user role connection limit is reached. This means that another role still eligible to establish a connection but the host is halted for seconds.
To Reproduce
Configure multihost jdbc url with two or more hosts.
Expected behaviour
Certain error codes shouldn't mark hosts as broken:
} catch (SQLExceptionse) {
closeStream(newStream);
if (isConnectFailure(se.getSQLState())) { // it needs to check a driver property with error codes listGlobalHostStatusTracker.reportHostStatus(hostSpec, HostStatus.ConnectFail);
}
knownStates.put(hostSpec, HostStatus.ConnectFail);
if (hostIter.hasNext()) {
...
The text was updated successfully, but these errors were encountered:
Describe the issue
Currently the
HostStatus.ConnectFail
status is being set on following exceptions attempting to obtain connection:ConnectException
IOException
SQLException
See
ConnectionFactoryImpl#openConnectionImpl
method. Setting this status the host is excluded from the hosts list for a certain number of seconds (hostRecheckSeconds
property).The problem that some error codes doesn't mean the host needs to be marked as unavailable. The example is 53300 - that means user role connection limit is reached. This means that another role still eligible to establish a connection but the host is halted for seconds.
Driver Version?
42.7.3
Java Version?
17
OS Version?
rhel 9
PostgreSQL Version?
13.9
To Reproduce
Configure multihost jdbc url with two or more hosts.
Expected behaviour
Certain error codes shouldn't mark hosts as broken:
The text was updated successfully, but these errors were encountered: