Conversation
|
Assigning @lukebakken and @jenagraham for review. |
There was a problem hiding this comment.
Yeah, got rid of all the crazy tabs at some point.
|
@alexmoore 🍙 is in your court 🍥 |
| try | ||
| { | ||
| channel = doGetConnection(); | ||
| channel = doGetConnection(true); |
There was a problem hiding this comment.
It seems weird that we get a connection during shutdown.
There was a problem hiding this comment.
Where do we get a connection on shutdown?
There was a problem hiding this comment.
Is that what is happening here? shutdown() method calls doGetConnection ?
There was a problem hiding this comment.
Not that I can see, the only places we call doGetConnection/1 are in start(), the general getConnection/1 method, and the health checker.
There was a problem hiding this comment.
Argh stupid GH code folding. Even when I expanded the diff it still wasn't clear. Sorry!
|
@alexmoore - any chance of merging in that other fix that will fix the build? |
|
This still needs fixes from #594. |
|
👍 Tests passed and coverage looks good. |
|
👍 f31e557 |
Fix for #572. Refresh connection IP address info with (possibly) new DNS info when creating a new connection.
1. Problem
If you used the Java Client in a cloud environment where IP addresses for DNS entries could change often, the Java client would not expire the old DNS lookup to get the newest IP address.
2. Solution
Force a refresh any time a connection is made outside of the cluster/node
start()method. (Lookup is done once at start).https://github.com/basho/riak-java-client/pull/573/files#diff-28c20364743c5fc78c7c41c7c8b89e88R293
Also added a log warning if they have their DNS cache setting set to "infinity", which would also cause this issue: https://github.com/basho/riak-java-client/pull/573/files#diff-28c20364743c5fc78c7c41c7c8b89e88R925
3. Test
Bootstrap/ChannelFuture/Channelwith aRiakNodefalseforchannel.isOpen()when we get the next connection, which should force a second lookup.https://github.com/basho/riak-java-client/pull/573/files#diff-4361a4b26a0905c4782f996ce653ccaaR416