For the same client (same zookeeper connection handle), that is already guaranteed. The only case read after write is not guaranteed would be that you get disconnected after writing and then connect to another zookeeper server for read.
You can probably work around this by doing a sync in the SYNCCONNECTED event callback. Some one else who knows the code well should confirm this behavior. thanks, Kishore G On Fri, Mar 1, 2013 at 12:50 PM, Yasin <[email protected]> wrote: > I am trying to build a system that is always consistent to any client. For > example a client sends a write request to update x from x=4 to x=5 to > zookeeper and zookeeper leader sends this write request to the followers. > In > the meantime, the same client wants to read x, and it gets the old value > (x=4) from some follower which has not updated the x value. I understand > client will get x=5 if it sync before read. This is the consistency model > that zookeeper provides. In this case the performance will decrease. > > > > -- > View this message in context: > http://zookeeper-user.578899.n2.nabble.com/Consistency-in-zookeeper-tp7578531p7578540.html > Sent from the zookeeper-user mailing list archive at Nabble.com. >
