You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by Qian Ye <ye...@gmail.com> on 2009/10/13 18:37:24 UTC

A question about SyncRequestProcessor

Hi all:
I'm confused with a part of the implementation of SyncRequestProcessor. The
source code show that the transaction log of the proposal is committed in
the 'flush' function,

private void flush(LinkedList<Request> toFlush)

However, at this time, the proposal has NOT been committed by the Leader
yet. If this proposal cannot be committed for some Exception. The
transaction log will still exists on the Follower, won't it? Although the
proposals which haven't been committed would not take effect actually, if we
restart the whole system after that, will these uncommitted-transactions
start to take effect?

Could any one explain it to me, please?

-- 
With Regards!

Ye, Qian
Made in Zhejiang University

Re: A question about SyncRequestProcessor

Posted by Mahadev Konar <ma...@yahoo-inc.com>.
Hi Qian,
 The explanation is little more detailed and goes into the gurantees of
ZooKeeper. 

This presentation in

http://wiki.apache.org/hadoop/ZooKeeper/ZooKeeperPresentations

On zookeeper internals will give you some update on the theory and
guarantees of ZooKeeper. If you could read through it, your question might
get answered. If you still have questions please feel free to send an email
to zookeeper-dev

mahadev

On 10/13/09 9:37 AM, "Qian Ye" <ye...@gmail.com> wrote:

> Hi all:
> I'm confused with a part of the implementation of SyncRequestProcessor. The
> source code show that the transaction log of the proposal is committed in
> the 'flush' function,
> 
> private void flush(LinkedList<Request> toFlush)
> 
> However, at this time, the proposal has NOT been committed by the Leader
> yet. If this proposal cannot be committed for some Exception. The
> transaction log will still exists on the Follower, won't it? Although the
> proposals which haven't been committed would not take effect actually, if we
> restart the whole system after that, will these uncommitted-transactions
> start to take effect?
> 
> Could any one explain it to me, please?