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

LeaderLatch isn't able to recover after zk recover/leaderPath missing.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.5.0, 5.6.0, 5.7.0, 5.7.1
    • 5.8.0
    • Recipes
    • None

    Description

      zk server: 3.7.2

      After https://github.com/apache/curator/pull/430, after the zk was down and recovered, the LeaderLatch called getChildren() instead of reset() to recover the leader election. But getChildren() triggers setNode() via callback client.getChildren().inBackground(callback).forPath(ZKPaths.makePath(latchPath, null)). If the leaderPath node doesn't exist after zk recovered, then the LeaderLatch node wouldn't never recreated.

      There is a temporary solution, adding a ConnectionStateListener before the LeaderLatch internal ConnectionStateListener, to create the leaderPath node manually. Then this issue will be fixed.

      Attachments

        Issue Links

          Activity

            People

              tison Zili Chen
              kuradeon Kuradeon
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: