Uploaded image for project: 'Apache Curator'
  1. Apache Curator
  2. CURATOR-546

currentData in ModeledCacheImpl removes ZPath from cache entries

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 4.2.0
    • 4.3.0
    • Client, Framework
    • None

    Description

      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();
      }

       

      Attachments

        Issue Links

          Activity

            People

              randgalt Jordan Zimmerman
              SheepSheep Yang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h