zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "maoling (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ZOOKEEPER-3289) Throw KeeperException with path in DataTree operations
Date Tue, 26 Feb 2019 03:48:00 GMT

    [ https://issues.apache.org/jira/browse/ZOOKEEPER-3289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16777547#comment-16777547
] 

maoling commented on ZOOKEEPER-3289:
------------------------------------

---> "*Currently, if ZooKeeper delete a znode that does not exist. It throws a {{KeeperException.NoNodeException}} without
path message.*"

        **        
{code:java}
zk.delete("/ooxx_fuckme", -1);{code}
org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for */ooxx_fuckme*
 at org.apache.zookeeper.KeeperException.create(KeeperException.java:111)
 at org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
 at org.apache.zookeeper.ZooKeeper.delete(ZooKeeper.java:873)

> Throw KeeperException with path in DataTree operations
> ------------------------------------------------------
>
>                 Key: ZOOKEEPER-3289
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3289
>             Project: ZooKeeper
>          Issue Type: Improvement
>          Components: server
>    Affects Versions: 3.5.4, 3.4.13
>            Reporter: TisonKun
>            Priority: Major
>             Fix For: 3.5.5, 3.4.14
>
>
> Currently, if ZooKeeper delete a znode that does not exist. It throws a {{KeeperException.NoNodeException}}
without path message. It causes difficulty when user debug with ZooKeeper. For example,
> Assume we try to do a transaction(with Curator encapsulation)
> {code:java}
> client.inTransaction()
>    .check().forPath(path1).and()
>    .delete().forPath(path2).and()
>    .commit()
> {code}
> if the statement throw an exception {{KeeperException.NoNodeException}} without path
information, we can hardly know that it failed at {{check}} or {{delete}}.
> Thus I propose throws KeeperException with path in DataTree operations. We can achieve
this without burden.



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

Mime
View raw message