You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Jordan Zimmerman (Reopened) (JIRA)" <ji...@apache.org> on 2011/11/04 07:49:00 UTC

[jira] [Reopened] (ZOOKEEPER-1262) Documentation for Lock recipe has major flaw

     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jordan Zimmerman reopened ZOOKEEPER-1262:
-----------------------------------------


Hmm - maybe I shouldn't have closed this.
                
> Documentation for Lock recipe has major flaw
> --------------------------------------------
>
>                 Key: ZOOKEEPER-1262
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1262
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: documentation
>    Affects Versions: 3.3.3
>            Reporter: Jordan Zimmerman
>         Attachments: patch.txt, recipes.diff, recipes.html
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira