Преглед изворни кода

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 година
родитељ
комит
9d236acf2a
1 измењених фајлова са 5 додато и 3 уклоњено
  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);
 			memb_state_commit_enter (instance);
 		} else {
 		} else {
-			return;
+			goto out;
 		}
 		}
 	} else
 	} else
 	if (memb_set_subset (proc_list,
 	if (memb_set_subset (proc_list,
@@ -4012,12 +4012,12 @@ static void memb_join_process (
 		instance->my_failed_list,
 		instance->my_failed_list,
 		instance->my_failed_list_entries)) {
 		instance->my_failed_list_entries)) {
 
 
-		return;
+		goto out;
 	} else
 	} else
 	if (memb_set_subset (&memb_join->system_from, 1,
 	if (memb_set_subset (&memb_join->system_from, 1,
 		instance->my_failed_list, instance->my_failed_list_entries)) {
 		instance->my_failed_list, instance->my_failed_list_entries)) {
 
 
-		return;
+		goto out;
 	} else {
 	} else {
 		memb_set_merge (proc_list,
 		memb_set_merge (proc_list,
 			memb_join->proc_list_entries,
 			memb_join->proc_list_entries,
@@ -4062,6 +4062,8 @@ static void memb_join_process (
 		memb_state_gather_enter (instance, 11);
 		memb_state_gather_enter (instance, 11);
 		gather_entered = 1;
 		gather_entered = 1;
 	}
 	}
+
+out:
 	if (gather_entered == 0 &&
 	if (gather_entered == 0 &&
 		instance->memb_state == MEMB_STATE_OPERATIONAL) {
 		instance->memb_state == MEMB_STATE_OPERATIONAL) {