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

Bug in WriteLock recipe implementation?

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.2.2
    • None
    • recipes
    • None
    • 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.3.patch.txt
          14 kB
          Matt Martin
        3. ZOOKEEPER-645-compareTo.patch
          0.7 kB
          Andre Esteve

        Issue Links

          Activity

            People

              mahadev Mahadev Konar
              jaakko Jaakko Laine
              Votes:
              1 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated: