[
https://issues.apache.org/jira/browse/ZOOKEEPER-2016?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14109752#comment-14109752
]
Alexander Shraer commented on ZOOKEEPER-2016:
---------------------------------------------
Hi Hongchao,
thanks a lot for taking this on!
I'll take a closer look later, but first a high level comment - the rebalancing
callback is not only done for the client that invoked reconfig. All clients set
a watch on the special znode, and when one client invokes reconfig, all these
watches will be triggered. This shouldn't be tied to the response of reconfig
rather to the watches set on the znode, please see the example at the end of
the Google Doc. My thought was that the client side library will have some kind
of handler for these watch events. The complication is that I'm not sure if
currently the client side library is intercepting events in this way. A second
complication is that we only want to intercept watches fired on the special
reconfig znode but pass all other events to the client code. I'm not sure
exactly how this can be done.
> Automate client-side rebalancing
> --------------------------------
>
> Key: ZOOKEEPER-2016
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2016
> Project: ZooKeeper
> Issue Type: Improvement
> Reporter: Hongchao Deng
> Attachments: draft.patch
>
>
> ZOOKEEPER-1355 introduced client-side rebalancing, which is implemented in
> both the C and Java client libraries. However, it requires the client to
> detect a configuration change and call updateServerList with the new
> connection string (see reconfig manual). It may be better if the client just
> indicates that he is interested in this feature when creating a ZK handle and
> we'll detect configuration changes and invoke updateServerList for him
> underneath the hood.
--
This message was sent by Atlassian JIRA
(v6.2#6252)