Hi Hoang, It seem you missed to see this, can you please review.
-AVM On 1/6/2017 5:47 PM, mahesh.va...@oracle.com wrote: > src/ckpt/ckptd/cpd_sbevt.c | 30 +++++++++++++++++++++--------- > 1 files changed, 21 insertions(+), 9 deletions(-) > > > Issue : According to Ckpt non-collocated ckpt implementation > the cluster can have max 3 replicas > and minimum of 2 replicas,if the non-collocated > ckpt is opened on controller initially , > by default cpsv service will create 2 replicas > each one on controllers , > else the non-collocated ckpt is opened on payload > initially,by default cpsv service will create 3 replicas > one on the payload and other each one on > controllers,so any further opens form any other payload is not > required to create replicas locally.All other > node ckpt application will access the data form the > default created active replica. > > In current code ha bug in active standby MBCSV > checkpoint of CPD_CKPT_REF_INFO data is mismatching > while creating replica node for non-collocated of > a payload > > Fix : This patch address the issue by matching > CPD_CKPT_REF_INFO data by not crating > cpd_ckpt_reploc_node cpd_ckpt_ref_info , for the > any further opens > form any other payload opened the ckpt above max 3 > replicas. > > diff --git a/src/ckpt/ckptd/cpd_sbevt.c b/src/ckpt/ckptd/cpd_sbevt.c > --- a/src/ckpt/ckptd/cpd_sbevt.c > +++ b/src/ckpt/ckptd/cpd_sbevt.c > @@ -456,6 +456,7 @@ uint32_t cpd_sb_proc_ckpt_dest_add(CPD_C > SaClmClusterNodeT cluster_node; > CPD_REP_KEY_INFO key_info; > CPD_NODE_REF_INFO *nref_info; > + bool noncoll_rep_on_payload = false; > > TRACE_ENTER(); > > @@ -497,9 +498,20 @@ uint32_t cpd_sb_proc_ckpt_dest_add(CPD_C > > reploc_info->rep_key.node_name = > strdup(osaf_extended_name_borrow(&cluster_node.nodeName)); > reploc_info->rep_key.ckpt_name = strdup(ckpt_node->ckpt_name); > - if (!m_IS_SA_CKPT_CHECKPOINT_COLLOCATED(&ckpt_node->attributes)) > + if > (!m_IS_SA_CKPT_CHECKPOINT_COLLOCATED(&ckpt_node->attributes)) { > reploc_info->rep_type = REP_NONCOLL; > - else { > + if > ((cpd_get_slot_sub_id_from_mds_dest(msg->info.dest_add.mds_dest) == > cb->cpd_remote_id) || > + > (cpd_get_slot_sub_id_from_mds_dest(msg->info.dest_add.mds_dest) == > cb->cpd_self_id) ) { > + TRACE_4(" reploc node add for non-collocated on > controller ckpt_id:%llx", msg->info.dest_add.ckpt_id); > + proc_rc = > cpd_ckpt_reploc_node_add(&cb->ckpt_reploc_tree, reploc_info, cb->ha_state, > cb->immOiHandle); > + if (proc_rc != NCSCC_RC_SUCCESS) { > + TRACE_4("cpd standby dest add evt > failed "); > + } > + } else { > + TRACE_4(" reploc node add for non-collocated on > paylaod ckpt_id:%llx",msg->info.dest_add.ckpt_id); > + noncoll_rep_on_payload = true; > + } > + } else { > if ((ckpt_node->attributes.creationFlags & > SA_CKPT_WR_ALL_REPLICAS) && > > (m_IS_SA_CKPT_CHECKPOINT_COLLOCATED(&ckpt_node->attributes))) > reploc_info->rep_type = REP_SYNCUPD; > @@ -511,17 +523,17 @@ uint32_t cpd_sb_proc_ckpt_dest_add(CPD_C > if ((ckpt_node->attributes.creationFlags & > SA_CKPT_WR_ACTIVE_REPLICA_WEAK) && > > (m_IS_SA_CKPT_CHECKPOINT_COLLOCATED(&ckpt_node->attributes))) > reploc_info->rep_type = REP_NOTACTIVE; > - } > > - proc_rc = cpd_ckpt_reploc_node_add(&cb->ckpt_reploc_tree, > reploc_info, cb->ha_state, cb->immOiHandle); > - if (proc_rc != NCSCC_RC_SUCCESS) { > - TRACE_4("cpd standby dest add evt failed "); > - /* goto free_mem; */ > + proc_rc = > cpd_ckpt_reploc_node_add(&cb->ckpt_reploc_tree, reploc_info, cb->ha_state, > cb->immOiHandle); > + if (proc_rc != NCSCC_RC_SUCCESS) { > + TRACE_4("cpd standby dest add evt failed "); > + } > } > } > > - cpd_ckpt_ref_info_add(node_info, ckpt_node); > - > + if (noncoll_rep_on_payload != true) { > + cpd_ckpt_ref_info_add(node_info, ckpt_node); > + } > TRACE_1("cpd standby destadd evt success ckpt_id %llx mdsdest: > %"PRIu64, msg->info.dest_add.ckpt_id, msg->info.dest_add.mds_dest); > > TRACE_LEAVE(); > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > Opensaf-devel mailing list > Opensaf-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/opensaf-devel ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel