Ted, your suggested flow guaranteed the update sequence to succeed or fail 
completely. It is under the assumption that zookeeper requester is stable 
enough. what if a server restart occur in the update sequence, no abort or 
proceed action can be done. I'm just curious how to handle this kinds of dirty 



发件人: Ted Dunning <ted.dunn...@gmail.com>
发送时间: 2010-03-30 15:39
主 题: Re: Re: Re: How to ensure trasaction create-and-update
收件人: zookeeper-user@hadoop.apache.org

As I mentioned, you can keep state in the disk as an echo of the diskPair. 
If you don't mind a small delay after constructing the pair, then you can 
just rely on the copy in the disk structure and never refer to the version 
in the diskPair. 

The other transitions that you describe can easily be implemented on that 
same basis. 

On Tue, Mar 30, 2010 at 12:22 AM, zd.wbh <zd....@163.com> wrote: 

> It is in the situation 2, it's important to keep a disk in only one 
> diskPair.Your suggested flow would fit. But it's best to keep the state with 
> the disk rather than diskPair. When one disk goes bad, pick a HOTSPARE state 
> disk, change the state to DUMPING, begin to copy data from the other disk of 
> the pair, when data ready, update state to ONLINE to serve clients. 

Reply via email to