Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Zookeeper >> mail # user >> consistency question


Copy link to this message
-
Re: consistency question
Hi Jordan, A write operation implies a sync, but not the other way  
around. Write operations are forwarded to the leader, which executes  
the operation and propagates the change in the form of a transaction  
using Zab. When the leader commits the transaction, it sends commit  
messages to the followers, which essentially flushes the channel  
sbetween the leader and the followers. The sync operation, different  
from a regular write operation, simply flushes the channel and it does  
not induce a change to the zookeeper state or a Zab broadcast.

Keeping the above in mind and that operations of a client are executed  
in FIFO order, a getChildren issued after W is such that the  
getChildren must reflect W and all the updates that have been ordered  
by Zab before W.

-Flavio

On Dec 5, 2011, at 12:07 AM, Jordan Zimmerman wrote:

> Does a write operation imply a sync()? I'm reading the double  
> barrier recipe and it appears to assume that it does. Node n is  
> created and then getChildren is called. The recipe requires that the  
> getChildren() reflect all nodes that have create their node n.  Am I  
> misreading the recipe?
>
> -JZ

flavio
junqueira

research scientist

[EMAIL PROTECTED]
direct +34 93-183-8828

avinguda diagonal 177, 8th floor, barcelona, 08018, es
phone (408) 349 3300    fax (408) 349 3301