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

Bug in WriteLock recipe implementation?

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.2.2
    • Fix Version/s: 3.7.0
    • Component/s: recipes
    • Labels:
      None
    • Environment:

      3.2.2 java 1.6.0_12

      Description

      Not sure, but there seem to be two issues in the example WriteLock:

      (1) ZNodeName is sorted according to session ID first, and then according to znode sequence number. This might cause starvation as lower session IDs always get priority. WriteLock is not thread-safe in the first place, so having session ID involved in compare operation does not seem to make sense.

      (2) if findPrefixInChildren finds previous ID, it should add dir in front of the ID

        Attachments

        1. 645-fix-findPrefixInChildren.patch
          0.7 kB
          Jaakko Laine
        2. ZOOKEEPER-645-compareTo.patch
          0.7 kB
          Andre Esteve
        3. ZOOKEEPER-645.3.patch.txt
          14 kB
          Matt Martin

          Issue Links

            Activity

              People

              • Assignee:
                mahadev Mahadev Konar
                Reporter:
                jaakko Jaakko Laine
              • Votes:
                3 Vote for this issue
                Watchers:
                13 Start watching this issue

                Dates

                • Created:
                  Updated: