Dear Mahesh, Sorry for late reply when others tickets have higher priority.
I manually tested your case with collocated/non-collocated checkpoint and found that it work normally following expected scenario Thank you and best regards, Hoang -----Original Message----- From: A V Mahesh [mailto:mahesh.va...@oracle.com] Sent: Thursday, October 13, 2016 1:44 PM To: Nhat Pham <nhat.p...@dektech.com.au>; anders.wid...@ericsson.com Cc: opensaf-devel@lists.sourceforge.net; Hoang Vo <hoang.m...@dektech.com.au> Subject: Re: [PATCH 1 of 1] cpsv: Update ckpt_reploc_tree when unlinking a checkpoint [#1655] Hi Nhat Pham/Hoang, Can you please clarify following : >>Solution: >>--------- >> The solution is to remove replica location node of that checkpoint >>from the ckpt_reploc_tree when unlinking the checkpoint. If replica location node of that checkpoint from the ckpt_reploc_tree remove how will be existing application still accessing will behave ? say for example : Cpa-1 on node-A did unlinking a ckpt-1 Cpa-2 on node-A still accessing reading/writing/creating sections/ect .. for the unlinked ckpt-1 Can you please test this case -AVM On 1/6/2016 9:42 AM, Nhat Pham wrote: > osaf/services/saf/cpsv/cpd/cpd_db.c | 4 ++++ > osaf/services/saf/cpsv/cpd/cpd_proc.c | 30 ++++++++++++++++++++++++++++++ > 2 files changed, 34 insertions(+), 0 deletions(-) > > > Problem: > -------- > The replica IMM objects are not created after opening a checkpoint in following scenario: > > 1. Open a checkpoint with flag SA_CKPT_CHECKPOINT_CREATE 2. Unlink the > checkpoint ( the checkpoint is still being used) 3. Open a checkpoint > with flag SA_CKPT_CHECKPOINT_CREATE with same name as the one in 1. > > After step 3. although the checkpoint is opened successfully, the > replica IMM objects are not created. > > The problem happens because the CPD does not delete relating nodes > from ckpt_reploc_tree when it unlinks the checkpoint in step 2. > > Solution: > --------- > The solution is to remove replica location node of that checkpoint > from the ckpt_reploc_tree when unlinking the checkpoint. > > diff --git a/osaf/services/saf/cpsv/cpd/cpd_db.c > b/osaf/services/saf/cpsv/cpd/cpd_db.c > --- a/osaf/services/saf/cpsv/cpd/cpd_db.c > +++ b/osaf/services/saf/cpsv/cpd/cpd_db.c > @@ -420,6 +420,8 @@ uint32_t cpd_ckpt_reploc_node_delete(CPD > { > uint32_t rc = NCSCC_RC_SUCCESS; > > + TRACE_ENTER(); > + > if (cb->ha_state == SA_AMF_HA_ACTIVE) { > > rc = cpd_ckpt_reploc_imm_object_delete(cb, ckpt_reploc_node, > is_unlink_set); @@ -441,6 +443,7 @@ uint32_t cpd_ckpt_reploc_node_delete(CPD > TRACE_4("cpd db node add failed "); > } > > + TRACE_LEAVE(); > return NCSCC_RC_FAILURE; > } > > @@ -448,6 +451,7 @@ uint32_t cpd_ckpt_reploc_node_delete(CPD > if (ckpt_reploc_node) > m_MMGR_FREE_CPD_CKPT_REPLOC_INFO(ckpt_reploc_node); > > + TRACE_LEAVE(); > return rc; > } > > diff --git a/osaf/services/saf/cpsv/cpd/cpd_proc.c > b/osaf/services/saf/cpsv/cpd/cpd_proc.c > --- a/osaf/services/saf/cpsv/cpd/cpd_proc.c > +++ b/osaf/services/saf/cpsv/cpd/cpd_proc.c > @@ -1021,6 +1021,36 @@ uint32_t cpd_proc_unlink_set(CPD_CB *cb, > (*ckpt_node)->attributes = map_info->attributes; > /* Delete the MAP Info */ > rc = cpd_ckpt_map_node_delete(cb, map_info); > + > + /* Delete replica location of the unlinked checkpoint from the ckpt_reploc_tree */ > + CPD_NODE_REF_INFO *nref_info = (*ckpt_node)->node_list; > + > + while (nref_info) { > + SaClmNodeIdT node_id = m_NCS_NODE_ID_FROM_MDS_DEST(nref_info->dest); > + SaClmClusterNodeT cluster_node; > + CPD_REP_KEY_INFO key_info; > + CPD_CKPT_REPLOC_INFO *reploc_info = NULL; > + > + memset(&cluster_node, 0, sizeof(SaClmClusterNodeT)); > + memset(&key_info, 0, sizeof(CPD_REP_KEY_INFO)); > + > + if (saClmClusterNodeGet(cb->clm_hdl, node_id, CPD_CLM_API_TIMEOUT, &cluster_node) != SA_AIS_OK) { > + LOG_ER("cpd unlink set - saClmClusterNodeGet failed for node_id %u",node_id); > + rc = SA_AIS_ERR_LIBRARY; > + break; > + } > + > + key_info.node_name = cluster_node.nodeName; > + key_info.ckpt_name = *ckpt_name; > + > + cpd_ckpt_reploc_get(&cb->ckpt_reploc_tree, &key_info, &reploc_info); > + if (reploc_info) { > + cpd_ckpt_reploc_node_delete(cb, reploc_info, (*ckpt_node)->is_unlink_set); > + } > + > + nref_info = nref_info->next; > + } > + > TRACE_LEAVE(); > return rc; > } ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/xeonphi _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel