Uploaded image for project: 'Apache Helix'
  1. Apache Helix
  2. HELIX-679

Consolidated behaviors for deleteRecursive and deleteRecursively in ZkClient

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • helix-core
    • None

    Description

      According to it's documentation `deleteRecursive()` should return true if operation is successful else false. But the semantics of the base function (`delete()`) it calls is different: it returns true if operation is successful, returns false if node does not exist, throws exception upon other errors, and therefore `deleteRecursive()` will also throw exception, and will return false if any sub-path is deleted already, which is confusing

      To consolidate semantics, we should either have the function only return true/false or only throw exception upon error.

       

      Also, to make change backward compatible, I'd propose the following change:

      1. deleteRecursive() will only return true/false, and will not throw exception. If subpath does not exist, it should consider successful
      2. create a new method called deleteRecursively() that will only throw exception upon error.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              hzzh0301 Harry Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: