[sheepdog] [PATCH 2/2] sheep: check joining nodes with newer but invalid epoch

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Wed May 15 11:37:58 CEST 2013


At Wed, 15 May 2013 16:04:16 +0800,
Liu Yuan wrote:
> 
> On 05/14/2013 11:20 PM, MORITA Kazutaka wrote:
> >  
> > +	if (jm->epoch > local_epoch) {
> > +		if (sys->status == SD_STATUS_WAIT_FOR_JOIN) {
> > +			/* The joining node will be a master */
> > +			sd_eprintf("transfer mastership (%d, %d)", jm->epoch,
> > +				   local_epoch);
> > +			return CJ_RES_MASTER_TRANSFER;
> 
> If sys->status == SD_STATUS_WAIT_FOR_JOIN and another node from other
> cluster can join the cluster?  Why not directly check cluster ctime?

What do you mean by "directly check cluster ctime"?  We already check
cluster ctime at the beginning of this function.  The above codes are
just trying to find the latest epoch with master transfer.

Thanks,

Kazutaka



More information about the sheepdog mailing list