Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-3289

Throw KeeperException with path in DataTree operations

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • 3.5.4, 3.4.13
    • None
    • server
    • None

    Description

      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)

      client.inTransaction()
         .check().forPath(path1).and()
         .delete().forPath(path2).and()
         .commit()
      

      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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tison Zili Chen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: