[sheepdog] [PATCH] sheep: the joiner should exit when in CJ_RES_JOIN_LATER

Yunkai Zhang yunkai.me at gmail.com
Fri Jul 27 18:10:25 CEST 2012


On Fri, Jul 27, 2012 at 11:45 PM, Christoph Hellwig <hch at infradead.org> wrote:
> On Fri, Jul 27, 2012 at 07:36:15PM +0800, Liu Yuan wrote:
>> On 07/27/2012 06:50 PM, Yunkai Zhang wrote:
>> > -           if (result == CJ_RES_FAIL) {
>> > +           if (result == CJ_RES_FAIL || result == CJ_RES_JOIN_LATER) {
>> >                     eprintf("Failed to join, exiting.\n");
>> >                     sys->cdrv->leave();
>> >                     exit(1);
>>
>> I am not sure of this change because Christoph has refactored it a lot. Christoph, can you give this a review?
>
> It's wrong.  CJ_RES_JOIN_LATER now means that the node should join, but
> not count towards the nodes needed to set the cluster live.

Oh, I know what you mean. But now the node will be processed just like
normal nodes after added into delayed_node list:

        switch (result) {
        case CJ_RES_JOIN_LATER:
                add_delayed_node(le, joined);
                /*FALLTHRU*/
        case CJ_RES_SUCCESS:

Maybe we should break after add_delayed_node()?


>



-- 
Yunkai Zhang
Work at Taobao



More information about the sheepdog mailing list