curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CURATOR-241) PersistentEphemeralNode writes initial data on reconnect
Date Sun, 02 Aug 2015 23:44:05 GMT

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

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

Github user cammckenzie commented on a diff in the pull request:

    https://github.com/apache/curator/pull/95#discussion_r36049773
  
    --- Diff: curator-recipes/src/main/java/org/apache/curator/framework/recipes/nodes/PersistentEphemeralNode.java
---
    @@ -338,10 +338,14 @@ public void setData(byte[] data) throws Exception
             this.data.set(Arrays.copyOf(data, data.length));
             if ( isActive() )
             {
    -            client.setData().inBackground().forPath(getActualPath(), this.data.get());
    +            client.setData().inBackground().forPath(getActualPath(), getData());
             }
         }
     
    +    byte[] getData() {
    --- End diff --
    
    Is there a reason that this is package protected rather than private?


> PersistentEphemeralNode writes initial data on reconnect
> --------------------------------------------------------
>
>                 Key: CURATOR-241
>                 URL: https://issues.apache.org/jira/browse/CURATOR-241
>             Project: Apache Curator
>          Issue Type: Bug
>          Components: Recipes
>    Affects Versions: 2.8.0
>            Reporter: Alex Brasetvik
>
> A `PersistentEphemeralNode` initialised with "initial data", then updated using `setData("updated
data")` may overwrite the updated data with "initial data" on reconnect.



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

Mime
View raw message