[sheepdog] [PATCH v3 02/10] sheep: don't try to recover from working directory

MORITA Kazutaka morita.kazutaka at gmail.com
Thu May 9 18:17:59 CEST 2013


At Thu, 09 May 2013 21:57:33 +0800,
Liu Yuan wrote:
> 
> On 05/09/2013 06:15 PM, MORITA Kazutaka wrote:
> > --- a/sheep/recovery.c
> > +++ b/sheep/recovery.c
> > @@ -104,9 +104,12 @@ static int recover_object_from_replica(uint64_t oid, struct vnode_info *old,
> >  		if (is_invalid_vnode(vnode, cur->nodes, cur->nr_nodes))
> >  			continue;
> >  
> > -		if (vnode_is_local(vnode) && tgt_epoch < sys_epoch())
> > -			ret = sd_store->link(oid, tgt_epoch);
> > -		else {
> > +		if (vnode_is_local(vnode)) {
> > +			if (tgt_epoch < sys_epoch())
> > +				ret = sd_store->link(oid, tgt_epoch);
> > +			else
> > +				ret = SD_RES_NO_OBJ;
> > +		} else {
> >  			sd_init_req(&hdr, SD_OP_READ_PEER);
> >  			hdr.epoch = epoch;
> >  			hdr.flags = SD_FLAG_CMD_RECOVERY;
> 
> Still the same problem. If the local recovery fails, you don't try
> recover from other nodes.

In this sereies, sheep doesn't exit the for loop when local recovery doesn't
return SD_RES_SUCCESS or SD_RES_OLD_NODE_VER, and tries to recover from the next
one, no?

Thanks,

Kazutaka



More information about the sheepdog mailing list