Read-your-writes consistency?

2009-07-14 Thread Marc Frei
Dear ZooKeeper users,

a short question about ZooKeeper's consistency model:

Does ZooKeeper support read-your-writes consistency? E.g., after
having created a node, will the same client always find the newly
created node via getChildren? If yes, is this specified behavior the
client can rely on? Or is it better to always call sync in order to
enforce consistency?

Thanks in advance and kind regards,

Marc


Re: Read-your-writes consistency?

2009-07-14 Thread Patrick Hunt

Yes, this is a strong guarantee:
http://hadoop.apache.org/zookeeper/docs/current/zookeeperProgrammers.html#ch_zkGuarantees

Sync is only necessary if client A makes a change, then client B wishes 
to read that change with guarantee that it will see the successfully 
applied change previously made by A (this is typically only an issue if 
A  B communicate through some non-zk channel, such as direct socket 
connection btw A  B).


Patrick

Marc Frei wrote:

Dear ZooKeeper users,

a short question about ZooKeeper's consistency model:

Does ZooKeeper support read-your-writes consistency? E.g., after
having created a node, will the same client always find the newly
created node via getChildren? If yes, is this specified behavior the
client can rely on? Or is it better to always call sync in order to
enforce consistency?

Thanks in advance and kind regards,

Marc