Uploaded image for project: 'Apache Curator'
  1. Apache Curator
  2. CURATOR-104

LeaderSelector issue after losing ZooKeeper leader

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.4.1
    • 2.4.2
    • None
    • None

    Description

      LeaderSelectors are not re-attempting leadership after a ZooKeeper leader is stopped and a client with leadership is stopped.

      I have a client process running on 2 servers. Each process is using LeaderSelectors for the same set of leaderPaths.

      The scenario:
      1 - Both clients running, with one client being the leader of each path (2 children are under each leaderPath)
      2 - Stop the ZooKeeper leader
      3 - All clients temporarily lose leadership (0 children are under each leaderPath)
      4 - Leadership is regained by the same clients that had leadership in step 1 (1 child is under each leaderPath)
      5 - Stop a client with leadership
      6 - No other clients pick up leadership of the leaderPaths from step 5 (0 children are under each leaderPath)
      Sometimes, a client will pick up one of the leaderPaths, but not more than one.

      I’m using Curator 2.4.1 and ZooKeeper 3.4.5.
      I originally saw the issue with Curator 2.3.0, and was hoping it was the same as https://issues.apache.org/jira/browse/CURATOR-73.

      Attachments

        1. lost_leadership_example.patch
          8 kB
          Greg Moulliet
        2. lost_leadership_test_and_fix.patch
          6 kB
          Greg Moulliet

        Issue Links

          Activity

            People

              randgalt Jordan Zimmerman
              moulliet Greg Moulliet
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: