[sheepdog] [PATCH 1/2] zookeeper: remove master from zookeeper

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Thu Aug 8 09:28:40 CEST 2013


At Thu, 8 Aug 2013 14:47:57 +0800,
Kai Zhang wrote:
> 
> On Aug 8, 2013, at 2:37 PM, MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp> wrote:
> 
> > At Thu, 8 Aug 2013 10:20:50 +0800,
> > Kai Zhang wrote:
> >> 
> >> 
> >> On the second thought, as I browse the code in zookeeper recipes, I think the
> >> code is not strong enough.
> >> For example, the lock function is based on creating sequence znode. However,
> >> if error occurs during the creation, it is not easy to retry it. And the code in
> >> the recipes didn't handle it at all.
> >> (The code I found is in version 3.4.5, seems the logic in the code is not same as 
> >> described in the website).
> >> 
> >> I would suggest that we use a little number for sleeping, e.g. 50ms.
> >> And check the existence before creating the lock znode.
> >> (checking existence is much cheeper than creating)
> >> 
> >> This may be simple but not the best choice. 
> >> If it is a big issue in production, I think we can make it better later in other way.
> > 
> > Looks good to me.
> 
> Thanks, I will update and send version 2 soon.

Thanks, I'm going to tag v0.7.0-rc0 after merging the patch.

Kazutaka



More information about the sheepdog mailing list