[sheepdog] [PATCH 1/2] zookeeper: remove master from zookeeper
MORITA Kazutaka
morita.kazutaka at lab.ntt.co.jp
Thu Aug 8 08:37:33 CEST 2013
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,
Kazutaka
More information about the sheepdog
mailing list