ASF GitHub Bot logged work on CURATOR-546:

                Author: ASF GitHub Bot
            Created on: 11/Oct/19 07:21
            Start Date: 11/Oct/19 07:21
    Worklog Time Spent: 10m 
      Work Description: cammckenzie commented on issue #329: [CURATOR-546] - 
ModeledCacheImpl.currentData() was removing from entries instead of calling 
URL: https://github.com/apache/curator/pull/329#issuecomment-540946745
   Looks good to me.
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

Issue Time Tracking

    Worklog Id:     (was: 326754)
    Time Spent: 20m  (was: 10m)

> currentData in ModeledCacheImpl removes ZPath from cache entries 
> -----------------------------------------------------------------
>                 Key: CURATOR-546
>                 URL: https://issues.apache.org/jira/browse/CURATOR-546
>             Project: Apache Curator
>          Issue Type: Bug
>          Components: Client, Framework
>    Affects Versions: 4.2.0
>            Reporter: Yang
>            Priority: Blocker
>          Time Spent: 20m
>  Remaining Estimate: 0h
> I'm using AsyncCuratorFramework with cache, during testing I noticed that 
> *client.cache().currentChildren(<zkPath>)* not also return the full list of 
> children, by digging into *ModeledCacheImpl*, apparently some children been 
> deleted when I call *client.cache().currentData(<zkPath>)*. 
> What's the alternative for me if I wants to get cached node while don't 
> remove it from the cache? 
> public Optional<ZNode<T>> currentData(ZPath path)
>  {
>  Entry<T> entry = entries.remove(path);
>  if ( entry != null )
> { return Optional.of(new ZNodeImpl<>(path, entry.stat, entry.model)); }
> return Optional.empty();
>  }

This message was sent by Atlassian Jira

Reply via email to