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

When a quorum device registers it tells the corosync quorum engine of
the new quorum which then tries to do a new sync(). But that's no use
because the nodelist and ring_id is identical to before. Also it can try
and register while a sync is already in operation ... which gets it
awfully stuck!

So this patch makes the sync conditional on there being a new ring ID to
do a sync on.



git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1774 fd59a12c-fef9-0310-b244-a6a79926bd2f

Christine Caulfield 17 лет назад
Родитель
Сommit
fb833af401
1 измененных файлов с 6 добавлено и 4 удалено
  1. 6 4
      exec/vsf_quorum.c

+ 6 - 4
exec/vsf_quorum.c

@@ -119,11 +119,13 @@ static void quorum_api_set_quorum(unsigned int *view_list,
 	memcpy(&quorum_ring_id, ring_id, sizeof (quorum_ring_id));
 
 	quorum_view_list_entries = view_list_entries;
-	memcpy(quorum_view_list, view_list, sizeof(unsigned int)*view_list_entries);
 
-	/* Tell sync() */
-	sync_primary_callback_fn(view_list, view_list_entries,
-				 primary_designated, &quorum_ring_id);
+	/* Tell sync() only if there is a new ring_id (ie this is not a 'fake' quorum event) */
+	if (memcmp(&quorum_ring_id, ring_id, sizeof (quorum_ring_id))) {
+		sync_primary_callback_fn(view_list, view_list_entries,
+					 primary_designated, ring_id);
+	}
+	memcpy(quorum_view_list, view_list, sizeof(unsigned int)*view_list_entries);
 
 	/* Tell internal listeners */
 	send_internal_notification();