[Sheepdog] [PATCH] sheep: fix recovery logic

Liu Yuan namei.unix at gmail.com
Thu Feb 23 11:10:57 CET 2012


From: Liu Yuan <tailai.ly at taobao.com>

We should check if join_msg->inc_epoch before starting recovery after
a new jode joins.

Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
---
 sheep/group.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sheep/group.c b/sheep/group.c
index e81007c..d10ba06 100644
--- a/sheep/group.c
+++ b/sheep/group.c
@@ -820,7 +820,7 @@ static void __sd_join_done(struct cpg_event *cevent)
 
 	update_cluster_info(jm, &w->joined, w->member_list, w->member_list_entries);
 
-	if (sys_can_recover()) {
+	if (sys_can_recover() && jm->inc_epoch) {
 		list_for_each_entry_safe(node, t, &sys->leave_list, list) {
 			list_del(&node->list);
 		}
-- 
1.7.8.2




More information about the sheepdog mailing list