Github user afine commented on the issue:
https://github.com/apache/zookeeper/pull/173
sure, one is on the client and one is on the server but I do not think that
means the problem is inherently different.
I think it would be fair to say that both pr's revolve around what to do
when the answer we select from dns is not one that we could use (they both
revolve around calls to `InetAddress.getAllByName`). This patch description is
framed in a way where we are assuming there is a list of possible ip addresses
for some hostname and we just need to find one that is working. Nevertheless,
this patch should work when the address the hostname resolves to changes
entirely.
Likewise, ZOOKEEPER-2184 should handle the "first record doesn't work"
issue you are solving here.
I think it may be valuable to have some shared code that effectively deals
with mapping ip addresses to hostnames.
After an offline discussion with @hanm we concluded that this may be good
to look into after both 2691 and 2184 are merged in.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---