curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randgalt <...@git.apache.org>
Subject [GitHub] curator pull request #236: CURATOR-431 - Fixed stat population during create
Date Tue, 12 Sep 2017 13:11:48 GMT
Github user Randgalt commented on a diff in the pull request:

    https://github.com/apache/curator/pull/236#discussion_r138342246
  
    --- 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 --
    
    You can use `DataTree#copyStat()` - FYI


---

Mime
View raw message