zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jordan Zimmerman <jor...@jordanzimmerman.com>
Subject Re: Corner case in Ephemeral-sequential node creation
Date Wed, 29 Jul 2015 16:21:55 GMT
Here’s the comment from Curator that explains it and how Curator works around it:

"It turns out there is an edge case that exists when creating sequential-ephemeral nodes.
The creation can succeed on the server, but the server can crash before the created node name
is returned to the client. However, the ZK session is still valid so the ephemeral node is
not deleted. Thus, there is no way for the client to determine what node was created for them.

Even without sequential-ephemeral, however, the create can succeed on the sever but the client
(for various reasons) will not know it.

Putting the create builder into protection mode works around this. The name of the node that
is created is prefixed with a GUID. If node creation fails the normal retry mechanism will
occur. On the retry, the parent path is first searched for a node that has the GUID in it.
If that node is found, it is assumed to be the lost node that was successfully created on
the first try and is returned to the caller."

On July 29, 2015 at 11:19:37 AM, Prabhjot Bharaj (prabhbharaj@gmail.com) wrote:

Hello folks,  

I was going through this blog :  
http://blog.cloudera.com/blog/2013/05/zookeeper-made-simpler/ (it is 2+  
years old)  

In the second paragraph of the 'Recipes' section, there is a sentence:-  

*New users of ZooKeeper will not know that there is an edge case in  
ephemeral-sequential node creation that requires you to put a special  
“marker” in the node’s name so that you can search for the created node if  
an I/O failure occurs. This is but one of many edge cases that are not yet  
well documented.*  

I would request you to explain this corner case here, as I haven't  
considered this corner case anytime in my code.  


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