You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Jun Rao <ju...@gmail.com> on 2012/06/04 18:39:53 UTC

version Id after create

Hi,

It seems that the create API doesn't return Stat. So, the client can't
figure out the initial version id of a path after it's created. Should the
client just assume that the initial version is always 0?

Also, what's the difference between getVersion and getCVersion?

Thanks,

Jun

Re: version Id after create

Posted by Michi Mutsuzaki <mi...@cs.stanford.edu>.
Hi Jun,

Yes, the initial version is zero.

There are 3 versions in the Stat structure.

- version The number of changes to the data of this znode.
- cversion The number of changes to the children of this znode.
- aversion The number of changes to the ACL of this znode.

The stat structure is documented here:

http://zookeeper.apache.org/doc/r3.1.2/zookeeperProgrammers.html#sc_zkStatStructure

Thanks!
--Michi

On Mon, Jun 4, 2012 at 9:39 AM, Jun Rao <ju...@gmail.com> wrote:
> Hi,
>
> It seems that the create API doesn't return Stat. So, the client can't
> figure out the initial version id of a path after it's created. Should the
> client just assume that the initial version is always 0?
>
> Also, what's the difference between getVersion and getCVersion?
>
> Thanks,
>
> Jun