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

Liu Yuan namei.unix at gmail.com
Thu May 9 15:57:33 CEST 2013


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.

Thanks,
Yuan



More information about the sheepdog mailing list