[sheepdog] [PATCH v4 2/5] sheep: rejoin cluster after a zookeeper session timeout

Kai Zhang kyle at zelin.io
Wed Jun 19 14:35:42 CEST 2013


On Jun 18, 2013, at 4:02 PM, Kai Zhang <kyle at zelin.io> wrote:

> On Jun 18, 2013, at 3:47 PM, Liu Yuan <namei.unix at gmail.com> wrote:
> 
>> On 06/18/2013 03:26 PM, Liu Yuan wrote:
>>>> +		while (sd_reconnect_handler()) {
>> 
>> If zookeeper is the only user of this function, I'll frown upon
>> introducing it as a generic function to the cluster driver. At this
>> stage, it is better to stick this function to zk driver only.
> 
> Actually, I'm not quite sure if this function will be called by other drivers.
> If it is only used by zookeeper driver, I will move it to zookeeper.c.
> 

On the second thought, sd_reconnect_handler() does some thing that should not be seen by cluster driver.
For example:
        sys->status = SD_STATUS_WAIT_FOR_JOIN;
        sys->join_finished = false;

And maybe other drivers will also use this function later.

Thanks,
Kyle
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/sheepdog/attachments/20130619/cebb9ebb/attachment-0004.html>


More information about the sheepdog mailing list