Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-1262

Documentation for Lock recipe has major flaw

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.3.3
    • Fix Version/s: 3.5.0
    • Component/s: documentation
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      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.

        Attachments

        1. recipes.html
          33 kB
          Jordan Zimmerman
        2. recipes.diff
          5 kB
          Jordan Zimmerman
        3. patch.txt
          8 kB
          Jordan Zimmerman

          Activity

            People

            • Assignee:
              randgalt Jordan Zimmerman
              Reporter:
              randgalt Jordan Zimmerman
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: