[Sheepdog] [PATCH] sheep: if fail to read copy from replication, retry it
Liu Yuan
namei.unix at gmail.com
Fri Apr 27 06:44:08 CEST 2012
On 04/27/2012 10:27 AM, yaohaiting.wujue at gmail.com wrote:
> From: HaiTing Yao <wujue.yht at taobao.com>
>
> 1, Retry all of the replication, so will not breaking from the loop
>
> 2, Assign the actual returning value, because the EIO maybe lead to node
> leaving the cluster.
>
> Signed-off-by: HaiTing Yao <wujue.yht at taobao.com>
> ---
> sheep/store.c | 6 +-----
> 1 files changed, 1 insertions(+), 5 deletions(-)
>
> diff --git a/sheep/store.c b/sheep/store.c
> index 2173348..bffbf8c 100644
> --- a/sheep/store.c
> +++ b/sheep/store.c
> @@ -288,16 +288,12 @@ static int read_copy_from_replica(struct request *req, uint32_t epoch,
> case SD_RES_SUCCESS:
> ret = SD_RES_SUCCESS;
> goto out;
> - case SD_RES_OLD_NODE_VER:
> - case SD_RES_NEW_NODE_VER:
> - /* waits for the node list timer */
> - break;
> default:
> ;
> }
> }
>
> - ret = SD_RES_EIO;
> + ret = rsp->result;
> out:
> return ret;
> }
Applied
Thanks,
Yuan
More information about the sheepdog
mailing list