4
0
Эх сурвалжийг харах

defect 683
if active replica not set, checkpointread should return SA_AIS_ERR_NOT_EXIST


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

Steven Dake 20 жил өмнө
parent
commit
c731007ecd
1 өөрчлөгдсөн 2 нэмэгдсэн , 2 устгасан
  1. 2 2
      exec/ckpt.c

+ 2 - 2
exec/ckpt.c

@@ -3161,7 +3161,7 @@ static int message_handler_req_lib_ckpt_sectionread (struct conn_info *conn_info
 	log_printf (LOG_LEVEL_DEBUG, "Section overwrite from API fd %d\n", conn_info->fd);
 	checkpoint = ckpt_checkpoint_find_global (&req_lib_ckpt_sectionread->checkpointName);
 	
-	if (checkpoint && (checkpoint->expired == 0)) {
+	if (checkpoint && (checkpoint->expired == 0) && checkpoint->active_replica_set) {
 		/*
 		 * checkpoint opened is writeable mode so send message to cluster
 		 */
@@ -3194,7 +3194,7 @@ static int message_handler_req_lib_ckpt_sectionread (struct conn_info *conn_info
 		}
 	}
 	else {
-		log_printf (LOG_LEVEL_ERROR, "#### CKPT: Could Not Find the Checkpoint to read so Returning Error. ####\n");
+		log_printf (LOG_LEVEL_ERROR, "Could Not Find the Checkpoint, section or active replica to read.\n");
 
 		res_lib_ckpt_sectionread.header.size = sizeof (struct res_lib_ckpt_sectionread);
 		res_lib_ckpt_sectionread.header.id = MESSAGE_RES_CKPT_CHECKPOINT_SECTIONREAD;