Kaynağa Gözat

Fixed bug when corosync receive JoinMSG in OPERATIONAL state

Accordig the totem protocal, nodes should enter GATHER state when it
receive JoinMSG in OPERATIONAL state. If we discard it in OPERATIONAL
state, the nodes sending this JoinMSG could not receive the response
untill other nodes reach token lost timeout.

This bug will cause nodes having entered GATHER state spend more time to
rejoin the ring, and then it will make nodes reach token expired timeout
more easily.

Signed-off-by: Yunkai Zhang <qiushu.zyk@taobao.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
(cherry picked from commit d991400372603f2b42b0697614a39712f00fa52d)
Yunkai Zhang 14 yıl önce
ebeveyn
işleme
9d236acf2a
1 değiştirilmiş dosya ile 5 ekleme ve 3 silme
  1. 5 3
      exec/totemsrp.c

+ 5 - 3
exec/totemsrp.c

@@ -3999,7 +3999,7 @@ static void memb_join_process (
 
 			memb_state_commit_enter (instance);
 		} else {
-			return;
+			goto out;
 		}
 	} else
 	if (memb_set_subset (proc_list,
@@ -4012,12 +4012,12 @@ static void memb_join_process (
 		instance->my_failed_list,
 		instance->my_failed_list_entries)) {
 
-		return;
+		goto out;
 	} else
 	if (memb_set_subset (&memb_join->system_from, 1,
 		instance->my_failed_list, instance->my_failed_list_entries)) {
 
-		return;
+		goto out;
 	} else {
 		memb_set_merge (proc_list,
 			memb_join->proc_list_entries,
@@ -4062,6 +4062,8 @@ static void memb_join_process (
 		memb_state_gather_enter (instance, 11);
 		gather_entered = 1;
 	}
+
+out:
 	if (gather_entered == 0 &&
 		instance->memb_state == MEMB_STATE_OPERATIONAL) {