Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Zookeeper >> mail # dev >> zookeeper_interest returning ZOK on Connection Loss


+
Yunong Xiao 2012-11-04, 22:11
+
Michi Mutsuzaki 2012-11-05, 18:33
+
Yunong Xiao 2012-11-05, 21:19
+
Michi Mutsuzaki 2012-11-05, 21:59
+
Yunong Xiao 2012-11-05, 22:16
Copy link to this message
-
Re: zookeeper_interest returning ZOK on Connection Loss
On Mon, Nov 5, 2012 at 2:16 PM, Yunong Xiao <[EMAIL PROTECTED]> wrote:
> What happens if the server is offline? In the scenario you described, select()
> will never succeed, and zookeeper_interest() will never inform the upstream
> consumer that the server is down. That's the crux of the problem here, when the
> server is unavailable, the client needs to know after some amount of time that
> the connection has failed. Otherwise the upstream consumer has no idea the
> connection to zookeeper has been severed and will hang indefinitely.

If the server is offline, zookeeper client keeps trying to connect to
the server indefinitely. It's up to the caller to decide when to give
up. One possibility is to poll the connection state using zoo_state()
and give up on the handle if it doesn't become connected after certain
time.

--Michi

--Michi
+
Yunong Xiao 2012-11-14, 01:08
+
Anthony Barré 2013-03-27, 09:41