You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@curator.apache.org by dragonsinth <gi...@git.apache.org> on 2018/02/12 19:57:47 UTC

[GitHub] curator pull request #250: [CURATOR-447] TreeCache: Improve memory usage and...

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

    https://github.com/apache/curator/pull/250#discussion_r167668989
  
    --- Diff: curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/TreeCache.java ---
    @@ -377,15 +375,16 @@ public void processResult(CuratorFramework client, CuratorEvent event) throws Ex
                     Preconditions.checkState(parent == null, "unexpected EXISTS on non-root node");
                     if ( event.getResultCode() == KeeperException.Code.OK.intValue() )
                     {
    -                    nodeStateUpdater.compareAndSet(this, NodeState.DEAD, NodeState.PENDING);
    +                    childDataUpdater.compareAndSet(this, DEAD, null);
                         wasCreated();
                     }
                     break;
                 case CHILDREN:
                     if ( event.getResultCode() == KeeperException.Code.OK.intValue() )
                     {
                         ChildData oldChildData = childData;
    -                    if ( oldChildData != null && oldChildData.getStat().getMzxid() == newStat.getMzxid() )
    +                    //TODO consider doing update of cversion, pzxid, numChildren only
    --- End diff --
    
    seems reasonable to me


---