zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Dunning <ted.dunn...@gmail.com>
Subject Re: Using zookeeper to assign a bunch of long-running tasks to nodes (without unhandled tasks and double-handled tasks)
Date Tue, 26 Jan 2010 04:02:24 GMT
On Mon, Jan 25, 2010 at 7:12 PM, Qing Yan <qingyan@gmail.com> wrote:

> ...
> 2) Lose connection with the (quorum of) ZK cluster, e.g. C3 as mentioned
> before. if the situation continues will lead to CONNECTION_EXPIRE.
> ...
> About case 2), seems to me there is indeed a need for application to know
> about this, per ZK documentation :
> When you disconnect from a server (for example, when the server fails), you
> will not get any watches until the connection is reestablished. For this
> reason session events are sent to all outstanding watch handlers. Use
> session events to go into a safe mode: you will not be receiving events
> while disconnected, so your process should act conservatively in that mode.
> http://hadoop.apache.org/zookeeper/docs/r3.2.2/zookeeperProgrammers.html
> But from reading your post, it seems that case 2) will no longer be
> reported
> to application, hence the confusion.

I don't know if CONNECTION_LOSS would or would not be reported.  As you
point out, it may well be important to report it or to report it after a
short period of loss without reconnection.

I think that my preference would be that transactions during a connection
loss block until the connection is restored or the session expires.  That is
probably a matter of taste.  Some people would probably prefer that most
operations return quickly even at the cost of considerably more complex
semantics on their part.  Sequential creation, in particular, should
probably always block if the session is still conceivably alive.

 In any case, I think the documentation needs to be updated to reflect the
> latest design/contract change.

Of course.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message