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

WriteLock recipe: incorrect znode ordering when the sessionId is part of the znode name

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.4.10, 3.5.3
    • Fix Version/s: 3.5.4, 3.6.0, 3.4.12
    • Component/s: None
    • Labels:
      None

      Description

      When the nodes are sorted in WriteLock.java using a TreeSet the whole znode path is taken into account and not just the sequence number.

      This causes an issue when the sessionId is included in the znode path because a znode with a lower sessionId will appear as lower than other znode with a higher sessionId even if its sequence number is bigger.

      In specific situations this ended with two clients holding the lock at the same time.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              javicacheiro Javier Cacheiro
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: