You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2018/10/26 04:12:05 UTC
[GitHub] merlimat opened a new pull request #1762: Don't cache Bookie
hostname DNS resolution forever
merlimat opened a new pull request #1762: Don't cache Bookie hostname DNS resolution forever
URL: https://github.com/apache/bookkeeper/pull/1762
### Motivation
`BookieSocketAddress` is resolving the bookie DNS name in its constructor and then using the already resolved `InetSocketAddress` instance.
If the IP of a bookie changes, the BK client will continue to use the old IP address.
### Changes
Construct a new `InetSocketAddress` each time `getSocketAddress()` gets called (eg: each time we attempt to make a new connection) so that we're making sure to get the right IP.
I cannot think of a good way to add unit test for this at this point, suggestions are welcome.
I think this should be included in a patch release as well 4.7.3 or 4.8.1
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services