On 3 May 2010 16:40, Dave Wright <wrig...@gmail.com> wrote:
> > Should this be a znode in the privileged namespace?
> I think having a znode for the current cluster members is part of the
> ZOOKEEPER-107 proposal, with the idea being that you could get/set the
> membership just by writing to that node. On the client side, you could
> watch that znode and update your server list when it changes.
This is tricky: what happens if the server your client is connected to is
decommissioned by a view change, and you are unable to locate another server
to connect to because other view changes committed while you are
reconnecting have removed all the servers you knew about. We'd need to make
sure that watches on this znode were fired before a view change, but it's
hard to know how to avoid having to wait for a session timeout before a
client that might just be migrating servers reappears in order to make sure
it sees the veiw change.
Even then, the problem of 'locating' the cluster still exists in the case
that there are no clients connected to tell anyone about it.