Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ZOOKEEPER-3723: Zookeeper Client should not fail with ZSYSTEMERROR if…
… DNS does not resolve one of the servers in the zk ensemble The change is backported from Jeelani Mohamed Abdul Khader <mjeelanidevvm3360.prn2.facebook.com>'s #579 change done in "ZOOKEEPER-3095: Connect string fix for non-existent hosts" Code changes to not fail the session initiation if the DNS is not able to resolve the hostname of one of the servers in the Zookeeper ensemble. Some Background: The Zookeeper client resolves all the hostnames in the ensemble while establishing the session. In Kubernetes environment with coreDNS, the hostname entry gets removed from coreDNS during the POD restarts. Though we can manipulate the coreDNS settings to delay the removal of the hostname entry from DNS, we don't want to leave any race where Zookeeper client is trying to establish a session and it fails because the DNS temporarily is not able to resolve the hostname. So as long as one of the servers in the ensemble is able to be DNS resolvable, should we not fail the session establishment with hard error and instead try to establish the connection with one of the other servers Author: Suhas Dantkale <[email protected]> Reviewers: Enrico Olivelli <[email protected]>, Mate Szalay-Beko <[email protected]>, Damien Diederen <[email protected]> Closes #1259 from suhasdantkale/suhas/ZOOKEEPER-3723
- Loading branch information