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-431) Stat structure not filled when using the idiom create().orSetData()
Date Tue, 12 Sep 2017 22:24:02 GMT

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

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

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

    https://github.com/apache/curator/pull/236#discussion_r138482206
  
    --- Diff: curator-framework/src/main/java/org/apache/curator/framework/imps/CreateBuilderImpl.java
---
    @@ -1212,7 +1212,21 @@ public String call() throws Exception
                                 {
                                     if ( setDataIfExists )
                                     {
    -                                    client.getZooKeeper().setData(path, data, setDataIfExistsVersion);
    +                                    Stat setStat = client.getZooKeeper().setData(path,
data, setDataIfExistsVersion);
    +                                    if(storingStat != null)
    +                                    {
    +                                        storingStat.setAversion(setStat.getAversion());
    --- End diff --
    
    Thanks, there was another place in CreateBuilderImpl doing the same thing, and I've replaced
that with DataTree#copyStat() also.


> Stat structure not filled when using the idiom create().orSetData()
> -------------------------------------------------------------------
>
>                 Key: CURATOR-431
>                 URL: https://issues.apache.org/jira/browse/CURATOR-431
>             Project: Apache Curator
>          Issue Type: Bug
>          Components: Client
>    Affects Versions: 4.0.0
>            Reporter: Andrés Pipicello
>            Assignee: Cameron McKenzie
>         Attachments: CreateOrSetDataTest.java
>
>
> Hello
> It seems that when using the idiom {{client.create().orSetData()}}, the Stat structure
set with {{storingStatIn}} does not get filled if the path already exists.
> I attached a unit test that exemplifies the behaviour.
> Regards



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message