Hi Hoang,

Thanks for the comments i will incorporate these two comments while pushing.

-AVM


On 1/18/2017 10:17 AM, Vo Minh Hoang wrote:
> Dear Mahesh,
>
> I have 2 comments.
> Please find with [Hoang] tag and consider.
>
> Sincerely,
> Hoang
>
> -----Original Message-----
> From: mahesh.va...@oracle.com [mailto:mahesh.va...@oracle.com]
> Sent: Friday, January 6, 2017 7:17 PM
> To: hoang.m...@dektech.com.au
> Cc: opensaf-devel@lists.sourceforge.net
> Subject: [PATCH 1 of 1] cpd: syncup active standby mbcsv dtat for
> non-colcated ckpt above 3 replicas[#2253]
>
>   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 ");
> [Hoang] reploc_info is malloc in this scope, should free it here to avoid
> mem leak. So do LOC: 511 and 529.
> +                             }
> +                     } else {
> +                             TRACE_4(" reploc node add for
> non-collocated on paylaod ckpt_id:%llx",msg->info.dest_add.ckpt_id);
> [Hoang] consider changing trace message when we do not add anything here.
> Small typos " paylaod ".
> +                             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

Reply via email to