On 14 February 2014 04:03, Michael Troup <[email protected]> wrote:
> Hi, > > > I have written a simple client using the java API to test reconfiguring a > group of zookeeper servers (ZK-107 3.5.0). > > > I have 5 participating servers, 1 observing server & one client. > > > The client connects to the observer server & issues a sychronous > reconfig(...) command that removes one server at random - waits a period of > time & then adds the same server back in to the configuration. > > > This works if the reconfig removes a follower server. > > > If the reconfig removes a server that is a leader, the client is > disconnected - KeeperErrorCode = ConnectionLoss?. > > > I cannot see any reason why the client session (using the API & connected > to the observer server) should be disconnected. > > > Does anyone know if this is expected behaviour? I want to observe the > time for a leader removal in a reconfiguration, & this prevents me from > doing this. > If you swap the leader then you'll cause an election which means clients will be disconnected. With ZOOKEEPER-1607 Observers would be able to keep clients around. -rgs
