On Fri, Nov 4, 2011 at 9:54 AM, Mark Libucha <[email protected]> wrote:
> It seems to me that, like the synchronous write() methods, the synchronous
> create() method should return a Stat object. Why doesn't it? I know I could
> get the Stat object with a subsequent exists() call, but that leaves me
> vulnerable to a possible update window by another writer.

Sounds like an oversight, I don't see any jiras for this, you might
create one. Looks like we could easily overload the create api
(similar to getdata), however this would require a client-server
protocol level change as the create response from server doesn't
include the stat information.

> Also, the javadoc says the synchronous create(): "Returns: the actual path
> of the created node". It's not clear exactly what that means, and how it
> might be different from the path argument that gets passed to it? Does this
> have to do with whether or a not a chroot suffix was specified in
> constructor's connectString?
>

If you use the sequential flag the path you provide has a sequence
number appended. Feel free to open a doc jira to address this.

> Seems to me like the Stat object should contain the chroot-relative path
> and the "actual path" -- if these are indeed different -- and create()
> should return a Stat object. But not knowing the ZK internals, maybe that
> would be a resource issue?

chroot is intended to hide the absolute path from the client.

Regards,

Patrick

Reply via email to