Please send a new patch with a corrected commit message, for defects it should 
contain 3 paragraphs: symptom, analysis and change description. See inline for 
comments.
"during decoding" => "during checkpointing"?
Thanks,
Hans

> -----Original Message-----
> From: nagendr...@oracle.com [mailto:nagendr...@oracle.com]
> Sent: den 3 februari 2014 11:15
> To: Hans Feldt; Hans Nordebäck; praveen.malv...@oracle.com
> Cc: opensaf-devel@lists.sourceforge.net
> Subject: [PATCH 1 of 1] amfd: create comp if not found during decoding [#761]
> 
>  osaf/services/saf/amf/amfd/ckpt_dec.cc    |   5 +----
>  osaf/services/saf/amf/amfd/comp.cc        |  21 +++++++++++++++++++++
>  osaf/services/saf/amf/amfd/include/comp.h |   1 +
>  3 files changed, 23 insertions(+), 4 deletions(-)
> 
[Hans] missing symptom description, it could look like:

Standby osafamfd asserts with the following log:
Jan 30 08:19:53 err sc2 osafamfd[15184]: avd_ckpt_dec.c:3163: 
avsv_decode_warm_sync_rsp: Assertion '0' failed.
Which results in reboot of standby controller

Here comes the analysis...
> 
> Some times, because of timing issues, apply callback is reaching delayed
"is reaching delayed", not proper English. Applier not apply

> at standby controller. It happened during component oper state checkpoiting.
check pointing

> Since apply callback is not received at standby controller, component is not 
> found
applier callback is not received before check pointing of comp runtime 
attributes

> in data base and counter comp_updt is mismatched during warn sync and standby 
> amfd
> asserts.
the mismatch is detected later when periodic warm sync is done.

Here comes the change description...

> Fix for this is to create comp when not found in data base and wait for
> apply callback. When apply callback comes later, the other parameters like
there is no "wait" going on, remove. Applier, other attributes not parameters
> su are updated.
su, you mean other attributes in comp?

> 
> diff --git a/osaf/services/saf/amf/amfd/ckpt_dec.cc 
> b/osaf/services/saf/amf/amfd/ckpt_dec.cc
> --- a/osaf/services/saf/amf/amfd/ckpt_dec.cc
> +++ b/osaf/services/saf/amf/amfd/ckpt_dec.cc
> @@ -2419,10 +2419,7 @@ static uint32_t dec_comp_oper_state(AVD_
>               return status;
>       }
> 
> -     if (NULL == (comp_struct = avd_comp_get(&comp_ptr->comp_info.name))) {
> -             LOG_ER("%s: comp not found, %s", __FUNCTION__, 
> comp_ptr->comp_info.name.value);
> -             return NCSCC_RC_FAILURE;
> -     }
> +     comp_struct = avd_comp_get_or_create(&comp_ptr->comp_info.name);
> 
>       /* Update the fields received in this checkpoint message */
>       comp_struct->saAmfCompOperState = comp_ptr->saAmfCompOperState;
> diff --git a/osaf/services/saf/amf/amfd/comp.cc 
> b/osaf/services/saf/amf/amfd/comp.cc
> --- a/osaf/services/saf/amf/amfd/comp.cc
> +++ b/osaf/services/saf/amf/amfd/comp.cc
> @@ -1570,6 +1570,27 @@ static void comp_ccb_apply_cb(CcbUtilOpe
>       TRACE_LEAVE();
>  }
> 
> +/**
> + * Return an Comp object if it exist, otherwise create it and
> + * return a reference to the new object.
> + * @param dn
> + *
> + * @return AVD_COMP*
> + */
> +AVD_COMP *avd_comp_get_or_create(const SaNameT *dn)
> +{
> +     AVD_COMP *comp = avd_comp_get(dn);
> +
> +     if (!comp) {
> +             TRACE("'%s' does not exist, creating it", dn->value);
> +             comp = avd_comp_new(dn);
> +             osafassert(comp != NULL);
> +             avd_comp_db_add(comp);
> +     }
> +
> +     return comp;
> +}
> +
>  void avd_comp_constructor(void)
>  {
>       NCS_PATRICIA_PARAMS patricia_params;
> diff --git a/osaf/services/saf/amf/amfd/include/comp.h 
> b/osaf/services/saf/amf/amfd/include/comp.h
> --- a/osaf/services/saf/amf/amfd/include/comp.h
> +++ b/osaf/services/saf/amf/amfd/include/comp.h
> @@ -234,5 +234,6 @@ extern AVD_COMPCS_TYPE *avd_compcstype_g
>  extern AVD_COMPCS_TYPE *avd_compcstype_getnext(const SaNameT *dn);
>  extern AVD_COMPCS_TYPE * avd_compcstype_find_match(const SaNameT *csi, const 
> AVD_COMP *comp);
>  extern void avd_compcstype_constructor(void);
> +extern AVD_COMP *avd_comp_get_or_create(const SaNameT *dn);
> 
>  #endif

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to