zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zili Chen <wander4...@gmail.com>
Subject Re: [RFR] ZOOKEEPER-3290: Throw detailed KeeperException when multi-op failed
Date Wed, 11 Sep 2019 23:37:11 GMT
I met this issue again when working on Pravega[1], a project using
ZooKeeper.

I think it is nice to have that we throw the exactly path that cause the
multi-op fails.

Could you help to review the pull request?

Best,
tison.

[1] https://github.com/pravega/pravega/pull/4140#discussion_r322096138


Zili Chen <wander4096@gmail.com> 于2019年8月25日周日 上午4:19写道:

> Hi ZooKeepers,
>
> ZOOKEEPER-3290 has been revived and here is its pull request[1].
>
> Basically it extends field of ErrorTxn/ErrorResponse/ErrorResult to
> reflect accurate path info when a transaction failed. For example,
> assumed we do check1(path1)-create1(path2) and fail with
> NoNodeException, previously we don't know it is because absence of
> path1? or path2? or parent of one of them? Now we will throw a
> KeeperException with the accurate path that cause it.
>
> For instance,
>
>     ZooKeeper zk = new ZooKeeper(...);
>
>     zk.multi(List.of(
>         Op.check("/path1", -1),
>         Op.create("/path2", ...)));
>
> formerly throw with
>
> Exception in thread "main"
> org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode =
> NoNode
>
> but now
>
> Exception in thread "main"
> org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode =
> NoNode for /path1
>
> Theoretically Jute is fine with this change so that we don't need to worry
> about compatibility issue. Please checkout the branch if you are
> interested
> in this feature.
>
> Any feedback includes things work as expected is welcome.
>
> Best,
> tison.
>
> [1] https://github.com/apache/zookeeper/pull/839
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message