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

defect 705
if synchronize executed on a checkpoint that was created WR_ALL_REPLICAS return
error.


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

Steven Dake 20 лет назад
Родитель
Сommit
86009cad4a
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      exec/ckpt.c

+ 3 - 0
exec/ckpt.c

@@ -3238,6 +3238,9 @@ static int message_handler_req_lib_ckpt_checkpointsynchronize (struct conn_info
 	struct saCkptCheckpoint *checkpoint;
 
 	checkpoint = ckpt_checkpoint_find_global (&req_lib_ckpt_checkpointsynchronize->checkpointName);
+	if ((checkpoint->checkpointCreationAttributes.creationFlags & (SA_CKPT_WR_ACTIVE_REPLICA | SA_CKPT_WR_ACTIVE_REPLICA_WEAK)) == 0) {
+		res_lib_ckpt_checkpointsynchronize.header.error = SA_AIS_ERR_BAD_OPERATION;
+	} else 
 	if (checkpoint->active_replica_set == 1) {
 		res_lib_ckpt_checkpointsynchronize.header.error = SA_AIS_OK;
 	} else {