Hi Arpit,

Stat#aversion represents "the number of changes to the ACL of this znode."
On calling the zkcli#setACL api, internally ZK server will increase the
'aversion' by one. If the given 'aversion' does not match the znode's
aversion it will throw BadVersionException.

While invoking the #setACL api, you should pass "Stat.aversion".

Rakesh

On Thu, Jun 22, 2017 at 11:34 PM, Arpit Agarwal <aagar...@hortonworks.com>
wrote:

> Greetings,
>
> For the ZooKeeper.setACL call:
>
> https://github.com/apache/zookeeper/blob/master/src/java/
> main/org/apache/zookeeper/ZooKeeper.java#L2368
>
>      public Stat setACL(final String path, List<ACL> acl, int version)
>
> Should version be set to Stat.version or Stat.aversion?
>
> Thanks,
> Arpit
>
>
>

Reply via email to