helix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hao Zhang (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HELIX-679) Consolidated behaviors for deleteRecursive and deleteRecursively in ZkClient
Date Thu, 08 Mar 2018 21:45:00 GMT
Hao Zhang created HELIX-679:
-------------------------------

             Summary: Consolidated behaviors for deleteRecursive and deleteRecursively in
ZkClient
                 Key: HELIX-679
                 URL: https://issues.apache.org/jira/browse/HELIX-679
             Project: Apache Helix
          Issue Type: Bug
          Components: helix-core
            Reporter: Hao Zhang


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:
 # deleteRecursive() will only return true/false, and will not throw exception. If subpath
does not exist, it should consider successful
 # create a new method called deleteRecursively() that will only throw exception upon error.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message