[sheepdog] [PATCH] sheep: the joiner should exit when in CJ_RES_JOIN_LATER
Yunkai Zhang
yunkai.me at gmail.com
Sat Jul 28 19:58:05 CEST 2012
On Sat, Jul 28, 2012 at 12:10 AM, Yunkai Zhang <yunkai.me at gmail.com> wrote:
> 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()?
By reading the code and do more testing, delayed nodes will change
current_vnode_info but won't cause recovery before the cluster status
become OK, so it's safe.
Sorry for my disturb.
>
>
>>
>
>
>
> --
> Yunkai Zhang
> Work at Taobao
--
Yunkai Zhang
Work at Taobao
More information about the sheepdog
mailing list