java-driver icon indicating copy to clipboard operation
java-driver copied to clipboard

Re-resolve hostnames as fallback when all hosts are unreachable

Open wprzytula opened this issue 2 years ago • 3 comments

If all nodes in the cluster change their IPs at one time, driver can no longer ever contact the cluster; the only solution is to restart the driver. A fallback should be added to the control connection reconnect logic so that when no known host is reachable, all hostnames among initial contact points are reresolved and control connection is attempted to be opened to any of them. If this succeeds, a metadata fetch is issued normally and the whole cluster is discovered with its new IPs.

An analogous feature has been merged to gocql lastly: https://github.com/gocql/gocql/pull/1708

wprzytula avatar Jul 03 '23 09:07 wprzytula

In scylla-4.x we should have the parameter called advanced.resolve-contact-points which should take care of that. So, if it works this enhancement should be done only for scylla-3.x

roydahan avatar Jun 13 '24 13:06 roydahan

This needs to get some attention. It was solved in most drivers already, not in Java 3.x.

mykaul avatar Aug 26 '24 15:08 mykaul

It is blocked by https://github.com/scylladb/java-driver/issues/333 and https://github.com/scylladb/java-driver/issues/334

dkropachev avatar Aug 31 '24 13:08 dkropachev