[
https://issues.apache.org/jira/browse/CURATOR-570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17126308#comment-17126308
]
Cam McKenzie commented on CURATOR-570:
--------------------------------------
[~ryarran], do you have a unit test that can reproduce this? I've been trying
to write one, but I can't reproduce the problem. I see that if you configure
the original connection string using hostnames, then you will get a single case
of calling into updateServerList() unnecessarily (as the hostnames don't match
the IPs in a string comparison), but after that, it seems to work fine, as the
'current' connection string stored by Curator is the one that contains the IPs.
I'm only running on the test server, but I don't see the configured hostnames
coming back in a different order either. I was only running with 3 instances in
the cluster though, not sure if you were running with more which may provoke
the issue.
> Excessive calls to ZooKeeper.updateServerList (which can result in session
> death)
> ---------------------------------------------------------------------------------
>
> Key: CURATOR-570
> URL: https://issues.apache.org/jira/browse/CURATOR-570
> Project: Apache Curator
> Issue Type: Bug
> Components: Framework
> Affects Versions: 4.2.0, 4.3.0
> Reporter: Rhys Yarranton
> Priority: Major
>
> On suspend and reconnect, Curator calls ZooKeeper.updateServerList via
> ConnectionState.checkState --> ConnectionState.handleNewConnectionString. In
> addition, recipes may be triggered by this as well, and they too make calls
> ZooKeeper.updateServerList via ConnectState.checkTimeouts -->
> ConnectionState.handleNewConnectionString.
> This happens even though the connection string has not actually changed.
> Due to ZOOKEEPER-3825, this can cause the connection to be closed
> immediately. On its own this would be perceived as a glitch. But due to the
> Curator-induced calls, what we see is a cycle of SUSPENDED/RECONNECTED, until
> eventually the session dies and a new session is recreated.
> Based on the source code (at time of writing), ZooKeeper.updateServerList is
> not intended to be called frequently like this.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)