You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@curator.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/09/02 20:06:45 UTC

[jira] [Commented] (CURATOR-258) PersistentEphemeralNode stops watching after first WatchedEvent

    [ https://issues.apache.org/jira/browse/CURATOR-258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14727748#comment-14727748 ] 

ASF GitHub Bot commented on CURATOR-258:
----------------------------------------

GitHub user nkvoll opened a pull request:

    https://github.com/apache/curator/pull/102

    [CURATOR-258] PersistentEphemeralNode stops watching after first WatchedEvent

    See https://issues.apache.org/jira/browse/CURATOR-258

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/nkvoll/curator CURATOR-258

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/curator/pull/102.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #102
    
----
commit cdb3a8035a551e3fb23e972a19cbeae47b14c27f
Author: Njal Karevoll <nj...@karevoll.no>
Date:   2015-09-02T18:03:28Z

    continue watching the node until it is deleted or the recipe is stopped

----


> PersistentEphemeralNode stops watching after first WatchedEvent
> ---------------------------------------------------------------
>
>                 Key: CURATOR-258
>                 URL: https://issues.apache.org/jira/browse/CURATOR-258
>             Project: Apache Curator
>          Issue Type: Bug
>          Components: Recipes
>    Affects Versions: 3.0.0, 2.8.0, 2.9.0, 2.9.1
>            Reporter: Njal Karevoll
>
> 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. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)