[sheepdog] [PATCH 2/2] sheep/recovery: don't recover from local if proved not identical

Liu Yuan namei.unix at gmail.com
Mon Mar 2 09:02:38 CET 2015


From: Liu Yuan <liuyuan at cmss.chinamobile.com>

If we are told that the digest is not identical, we should go normal recover
process and never try to compare the digest again down the epoch track.

Signed-off-by: Liu Yuan <liuyuan at cmss.chinamobile.com>
---
 sheep/recovery.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sheep/recovery.c b/sheep/recovery.c
index 36ef8a0..7e724c9 100644
--- a/sheep/recovery.c
+++ b/sheep/recovery.c
@@ -280,6 +280,9 @@ static int recover_object_from(struct recovery_obj_work *row,
 			ret = sd_store->link(oid, local_epoch);
 			if (ret == SD_RES_SUCCESS)
 				return ret;
+		} else {
+			/* Non-identical, bury the mind */
+			row->local_epoch = 0;
 		}
 	}
 
-- 
1.9.1




More information about the sheepdog mailing list