Done. https://issues.apache.org/jira/browse/ZOOKEEPER-2818

Thanks.

--Brahma Reddy Battula

-----Original Message-----
From: Rakesh Radhakrishnan [mailto:[email protected]] 
Sent: 23 June 2017 11:10
To: [email protected]
Subject: Re: Version parameter passed to ZooKeeper.setACL

Agreed. Please feel free to raise a jira task for improving zkcli#setACL() 
javadoc.

Rakesh

On Fri, Jun 23, 2017 at 8:32 AM, Brahma Reddy Battula < 
[email protected]> wrote:

> One suggestion here.
>
> Java doc or argument can be improved which might not mislead..?
>
> i) public Stat setACL(final String path, List<ACL> acl, int aversion 
> or
> aclVersion)
> ii) "should pass aclversion only"..something like this..
>
>
>
> --Brahma Reddy Battula
>
> -----Original Message-----
> From: Rakesh Radhakrishnan [mailto:[email protected]]
> Sent: 23 June 2017 10:47
> To: [email protected]
> Subject: Re: Version parameter passed to ZooKeeper.setACL
>
> 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 
> <[email protected]>
> 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