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

PathChildrenCache stops working if container node is auto-removed and later recreated

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.2.1
    • 4.0.1
    • Recipes
    • None
    • zookeeper 3.5.2-alpha

    Description

      PathChildrenCache uses EnsureContainers to create the path as a container(if it does not already exist). If at some point that container is empty, ZooKeeper may remove it. If at some later point the path is recreated and a child node added, the PathChildrenCache will not detect it. No event will be fired, nor will the child node appear in getCurrentData().

      The attached test reproduces the problem most of the time if the ZooKeeper server has znode.container.checkIntervalMs reduced to 1000.

      A workaround is to explicitly create the path as a non-container before starting the PathChildrenCache.

      NB there are two related problems here. One is that it has trouble handling containers. More serious is that it creates a container, thus running itself into trouble.

      Attachments

        1. EmptyPathChildrenCacheTest.java
          4 kB
          Rhys Yarranton

        Issue Links

          Activity

            People

              randgalt Jordan Zimmerman
              ryarran Rhys Yarranton
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: