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

PersistentEphemeralNode stops watching after first WatchedEvent

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0, 2.8.0, 2.9.0, 2.9.1
    • 3.0.0, 2.9.1
    • Recipes
    • None

    Description

      The `Watcher` in the `PersistentEphemeralNode` recipe only reacts to the `NodeDeleted` event. But it's possible to receive a `NodeDataChanged` event as well due to

      1. The node has been created before the recipe has been started, so the first event it receives is it's own update.

      2. The node has been created by another session, and the recipe accepts updating nodes belonging to a different session. In this case, it also receives it's own update in the `Watcher`, and no longer watches the node when the `NodeDeleted` event comes through (after the session of the other client expires). This is easily reproducible by restarting a service using a the recipe when the session timeout is higher than the service restart time.

      Attachments

        Activity

          People

            randgalt Jordan Zimmerman
            nkvoll Njal Karevoll
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: