[sheepdog] [PATCH] zookeeper: the joiner also needs to create member path when master transfer

Yunkai Zhang yunkai.me at gmail.com
Wed Jul 25 16:37:56 CEST 2012


From: Yunkai Zhang <qiushu.zyk at taobao.com>


Signed-off-by: Yunkai Zhang <qiushu.zyk at taobao.com>
---
 sheep/cluster/zookeeper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sheep/cluster/zookeeper.c b/sheep/cluster/zookeeper.c
index 75a08c1..4cd5be8 100644
--- a/sheep/cluster/zookeeper.c
+++ b/sheep/cluster/zookeeper.c
@@ -739,7 +739,7 @@ static void zk_handler(int listen_fd, int events, void *data)
 		switch (ev.join_result) {
 		case CJ_RES_SUCCESS:
 		case CJ_RES_JOIN_LATER:
-		/* what about CJ_RES_MASTER_TRANSFER ? */
+		case CJ_RES_MASTER_TRANSFER:
 			sprintf(path, MEMBER_ZNODE "/%s", node_to_str(&ev.sender.node));
 			if (node_eq(&ev.sender.node, &this_node.node)) {
 				dprintf("create path:%s\n", path);
-- 
1.7.11.2




More information about the sheepdog mailing list