Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.3.3
-
None
-
Reviewed
-
Updated recipes to document how to use a GUID to manage a recoverable create() error.
Description
The recipe for Locks documented here: http://zookeeper.apache.org/doc/trunk/recipes.html#sc_recipes_Locks doesn't deal with the problem of create() succeeding but the server crashing before the result is returned. As written, if the server crashes before the result is returned the client can never know what sequential node was created for it. The way to deal with this is to embed the session ID in the node name. The Lock implementation in the ZK distro does this. But, the documentation will lead implementors to write bad code.