Просмотр исходного кода

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>
Yunkai Zhang 14 лет назад
Родитель
Сommit
d991400372
1 измененных файлов с 5 добавлено и 3 удалено
  1. 5 3
      exec/totemsrp.c

+ 5 - 3
exec/totemsrp.c

@@ -4049,7 +4049,7 @@ static void memb_join_process (
 
 			memb_state_commit_enter (instance);
 		} else {
-			return;
+			goto out;
 		}
 	} else
 	if (memb_set_subset (proc_list,
@@ -4062,12 +4062,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,
@@ -4112,6 +4112,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) {