You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Ma, Ming" <mi...@ebay.com> on 2011/06/10 09:27:13 UTC

consistency in setData

Hi,

I am wondering if zookeeper API setData can get into a situation where client and zookeeper server have different views of the version/state of a zNode.

setData call allows application to specify desired version number, if it matches the version number in zookeeper server, the zookeeper server increments the version number by one and set the value to the zNode. After than it will return the status to client. What if at this point RPC fail to reach client due to network issue? So the client thinks the operation failed, but the server actually successfully set the value. So the client view will be different from the server view.

It seems certain application scenarios can tolerate this issue given a) the chance is low, b) retrying won't break the application logics. Thus the current behavior is good enough.

Is that the right understanding?

Thanks.

Ming