diff --git a/exec/ckpt.c b/exec/ckpt.c index b1f504a3..84c7ff33 100644 --- a/exec/ckpt.c +++ b/exec/ckpt.c @@ -3233,11 +3233,19 @@ static int message_handler_req_lib_ckpt_sectionread (struct conn_info *conn_info static int message_handler_req_lib_ckpt_checkpointsynchronize (struct conn_info *conn_info, void *message) { + struct req_lib_ckpt_checkpointsynchronize *req_lib_ckpt_checkpointsynchronize = (struct req_lib_ckpt_checkpointsynchronize *)message; struct res_lib_ckpt_checkpointsynchronize res_lib_ckpt_checkpointsynchronize; + struct saCkptCheckpoint *checkpoint; + + checkpoint = ckpt_checkpoint_find_global (&req_lib_ckpt_checkpointsynchronize->checkpointName); + if (checkpoint->active_replica_set == 1) { + res_lib_ckpt_checkpointsynchronize.header.error = SA_AIS_OK; + } else { + res_lib_ckpt_checkpointsynchronize.header.error = SA_AIS_ERR_NOT_EXIST; + } res_lib_ckpt_checkpointsynchronize.header.size = sizeof (struct res_lib_ckpt_checkpointsynchronize); res_lib_ckpt_checkpointsynchronize.header.id = MESSAGE_RES_CKPT_CHECKPOINT_CHECKPOINTSYNCHRONIZE; - res_lib_ckpt_checkpointsynchronize.header.error = SA_AIS_OK; libais_send_response (conn_info, &res_lib_ckpt_checkpointsynchronize, diff --git a/include/ipc_ckpt.h b/include/ipc_ckpt.h index c5352fb8..25de66cf 100644 --- a/include/ipc_ckpt.h +++ b/include/ipc_ckpt.h @@ -244,6 +244,7 @@ struct res_lib_ckpt_sectionread { struct req_lib_ckpt_checkpointsynchronize { struct req_header header; + SaNameT checkpointName; }; struct res_lib_ckpt_checkpointsynchronize { diff --git a/lib/ckpt.c b/lib/ckpt.c index f4c97add..3229ab50 100644 --- a/lib/ckpt.c +++ b/lib/ckpt.c @@ -1582,6 +1582,8 @@ saCkptCheckpointSynchronize ( req_lib_ckpt_checkpointsynchronize.header.size = sizeof (struct req_lib_ckpt_checkpointsynchronize); req_lib_ckpt_checkpointsynchronize.header.id = MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTSYNCHRONIZE; + memcpy (&req_lib_ckpt_checkpointsynchronize.checkpointName, + &ckptCheckpointInstance->checkpointName, sizeof (SaNameT)); pthread_mutex_lock (&ckptCheckpointInstance->response_mutex);