Hi Rafael,

As you rightly pointed,  we have just published a patch by  removing the retry 
from SmfCampaignWrapup::executeCampComplete and added retires only in 
SmfImmCcbAction::execute. We have thoroughly tested it. 

Thanks,
Syam.
-----Original Message-----
From: Rafael Odzakow [mailto:rafael.odza...@ericsson.com] 
Sent: Monday, November 27, 2017 8:07 PM
To: Vijay Roy <vijay....@oracle.com>
Cc: opensaf-devel@lists.sourceforge.net
Subject: Re: [devel] [PATCH 1/1] smf: SMF created a CCB to create 
smfRollbackElement object, but CCB was aborted due to IMM [#2676]

SmfCampaignWrapup::executeCampComplete()  is calling SmfImmCcbAction. So looks 
like a double retry spread out across two classes. Why not have the retries in  
SmfImmCcbAction::execute only?



On 11/17/2017 07:12 AM, Vijay Roy wrote:
>
> Hi Rafael,
>
> We need the while loop in “SmfCampaignWrapup::executeCampComplete()” 
> as we encountered the issue at Wrapup too while testing.
>
> Thanks
>
> Vijay
>
> -----Original Message-----
> From: Rafael Odzakow [mailto:rafael.odza...@ericsson.com]
> Sent: Thursday, November 16, 2017 8:54 PM
> To: Vijay Roy <vijay....@oracle.com>
> Cc: opensaf-devel@lists.sourceforge.net; Lennart Lund 
> <lennart.l...@ericsson.com>
> Subject: Re: [PATCH 1/1] smf: SMF created a CCB to create 
> smfRollbackElement object, but CCB was aborted due to IMM [#2676]
>
> What about the added while loops in
>
> SmfCampaignWrapup::executeCampComplete() should they be removed now 
> with this addition?
>
> On 11/16/2017 10:44 AM, Vijay Roy wrote:
>
> > Handling ERROR_EXIST in smfRollbackElement creation and handling
>
> > TRY_AGAIN in immCCBOperations.
>
> > ---
>
> >   src/smf/smfd/SmfUpgradeAction.cc | 26 +++++++++++++++++++-------
>
> >   1 file changed, 19 insertions(+), 7 deletions(-)
>
> >
>
> > diff --git a/src/smf/smfd/SmfUpgradeAction.cc
>
> > b/src/smf/smfd/SmfUpgradeAction.cc
>
> > index 94c3dfd..af75cd7 100644
>
> > --- a/src/smf/smfd/SmfUpgradeAction.cc
>
> > +++ b/src/smf/smfd/SmfUpgradeAction.cc
>
> > @@ -28,6 +28,7 @@
>
> >   #include "smf/smfd/SmfUtils.h"
>
> >   #include "smfd.h"
>
> >   #include "smf/smfd/SmfTargetTemplate.h"
>
> > +#include "base/time.h"
>
> >
>
> >   /*
> ======================================================================
> ==
>
> >    *   DEFINITIONS
>
> > @@ -460,6 +461,7 @@ SaAisErrorT
> SmfImmCcbAction::execute(SaImmOiHandleT i_oiHandle,
>
> > const std::string* i_rollbackDn) {
>
> >     SaAisErrorT result = SA_AIS_OK;
>
> >     SmfRollbackCcb* rollbackCcb = NULL;
>
> > +  base::Timer doImmOpTimer(60000);
>
> >
>
> >     TRACE_ENTER();
>
> >
>
> > @@ -473,8 +475,8 @@ SaAisErrorT
> SmfImmCcbAction::execute(SaImmOiHandleT i_oiHandle,
>
> >       immRollbackCcbDn += ",";
>
> >       immRollbackCcbDn += *i_rollbackDn;
>
> >
>
> > -    if ((result = smfCreateRollbackElement(immRollbackCcbDn,
> i_oiHandle)) !=
>
> > -        SA_AIS_OK) {
>
> > +    result = smfCreateRollbackElement(immRollbackCcbDn, 
> > +i_oiHandle);
>
> > +    if ((result != SA_AIS_OK) && (result != SA_AIS_ERR_EXIST)) {
>
> >         LOG_ER(
>
> > "SmfImmCcbAction::execute failed to create rollback element %s, 
> > rc=%s",
>
> > immRollbackCcbDn.c_str(), saf_error(result)); @@ -490,11
>
> > +492,21 @@ SaAisErrorT SmfImmCcbAction::execute(SaImmOiHandleT
> i_oiHandle,
>
> >     }
>
> >
>
> >     if (m_operations.size() > 0) {
>
> > -    SmfImmUtils immUtil;
>
> > -    if ((result = immUtil.doImmOperations(m_operations,
> rollbackCcb)) !=
>
> > -        SA_AIS_OK) {
>
> > -      delete rollbackCcb;
>
> > -      rollbackCcb = NULL;
>
> > +
>
> > + doImmOpTimer.set_timeout_time(60000);
>
> > +    while (doImmOpTimer.is_timeout() == false) {
>
> > +      SmfImmUtils immUtil;
>
> > +      result = immUtil.doImmOperations(m_operations, rollbackCcb);
>
> > +      if (result == SA_AIS_ERR_TRY_AGAIN) {
>
> > + base::Sleep(base::kFiveHundredMilliseconds);
>
> > +         continue;
>
> > +      } else if (result != SA_AIS_OK) {
>
> > +         LOG_WA("%s: SmfImmCcbAction:execute Fail '%s'",
>
> > +                 __FUNCTION__, saf_error(result));
>
> > +         delete rollbackCcb;
>
> > +         rollbackCcb = NULL;
>
> > +      }
>
> > +      break;
>
> >       }
>
> >     }
>
> >
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech 
sites, Slashdot.org! 
https://urldefense.proofpoint.com/v2/url?u=http-3A__sdm.link_slashdot&d=DwIGaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=V-rHpog7bglMV_qtz_u-J_IeS6G1w2MSO-XRrmj38iQ&m=3BNorA0hrRBHey_XMs0osATb17MU9JWzr1dNYJq2XZo&s=idWjmHhzWdiR4C1-0qqhsTpi13go7QbkgfDi3cv9XH0&e=
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.sourceforge.net_lists_listinfo_opensaf-2Ddevel&d=DwIGaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=V-rHpog7bglMV_qtz_u-J_IeS6G1w2MSO-XRrmj38iQ&m=3BNorA0hrRBHey_XMs0osATb17MU9JWzr1dNYJq2XZo&s=NSjrzQXvuEF9vIhKNs8B7MIItVLLq-JV6lc6A47gjhc&e=

------------------------------------------------------------------------------
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