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

PersistentNode sometimes deletes more ZNodes that expected when closed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 4.1.0
    • None
    • Recipes
    • None

    Description

      Hi there,

      I have an application using PersistentNode with CreateMode.EPHEMERAL that is reporting in ZK cluster in ZNode '/level1/level2/level3' and I am relying also in the recipe to create '/level1' and 'level1/level2' ZNodes.

      While testing the application I observe that sporidally when the PersistentNode is closed '/level1/level2' ZNode is deleted. That ZNode is PERSISTENT so I think only ''/level1/level2' ZNode should be deleted when closed. I was checking the code and when the PersistentNode is closed tries to delete what it is is nodePath variable, but the code does not check what is the exact path that the variable holds, making the behaviour non 100% determistic under certain conditions.

       

      In my view, the delete operation under close() method should only affect the basePath declared in the constructor, and in my view the delete should only apply when the CreateMode was EPHEMERAL.

       

      I think the code attach in the patch could solve the problem.

       

      Thx in advance,

       

      /evaristo

       

      Attachments

        1. PN.patch
          1 kB
          Chevaris

        Activity

          People

            Unassigned Unassigned
            evaristojosec@yahoo.es Chevaris
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: