Hi Mahesh,

There's a lot of iterators in IMM code.
I think it's better to have a ticket to refactor them all, just like AMF.

Thanks,

Hung Nguyen - DEK Technologies


--------------------------------------------------------------------------------
From: Mahesh Valla mahesh.va...@oracle.com
Sent: Wednesday, May 17, 2017 2:57PM
To: Hung Nguyen, Zoran Milinkovic, Neelakanta Reddy
     hung.d.ngu...@dektech.com.au, zoran.milinko...@ericsson.com, 
reddy.neelaka...@oracle.com
Cc: Opensaf-devel
     opensaf-devel@lists.sourceforge.net
Subject: Re: [devel] [PATCH 1/1] imm: Discard Adm Impl continuation when peer 
IMMND is down [#2461]


Hi Hung Nguyen,

On 5/17/2017 1:10 PM, Hung Nguyen wrote:
> +  /* Discard Adm Impl continuation */
> +  for (ci3 = sAdmImplContinuationMap.begin();
> +       ci3 != sAdmImplContinuationMap.end();) {
If possible convert iterator ci3 to auto.

-AVM

On 5/17/2017 1:10 PM, Hung Nguyen wrote:
> Discard Adm Impl continuation when peer IMMND is down.
> ---
>   src/imm/immnd/ImmModel.cc | 24 ++++++++++++++++++++++++
>   1 file changed, 24 insertions(+)
>
> diff --git a/src/imm/immnd/ImmModel.cc b/src/imm/immnd/ImmModel.cc
> index 56d8c8d..25f8621 100644
> --- a/src/imm/immnd/ImmModel.cc
> +++ b/src/imm/immnd/ImmModel.cc
> @@ -13804,6 +13804,7 @@ void ImmModel::discardNode(unsigned int 
> deadNode, IdVector& cv, IdVector& gv,
>     CcbVector::iterator i3;
>     ConnVector implv;
>     ConnVector::iterator i4;
> +  ContinuationMap3::iterator ci3;
>     TRACE_ENTER();
>       if (sImmNodeState == IMM_NODE_W_AVAILABLE) {
> @@ -13923,6 +13924,29 @@ void ImmModel::discardNode(unsigned int 
> deadNode, IdVector& cv, IdVector& gv,
>         osafassert((*i3)->mOriginatingConn == 0);  // Dead node can 
> not be us!!
>       }
>     }
> +
> +  /* Discard Adm Impl continuation */
> +  for (ci3 = sAdmImplContinuationMap.begin();
> +       ci3 != sAdmImplContinuationMap.end();) {
> +    if (m_NCS_NODE_ID_FROM_MDS_DEST(ci3->second.mReply_dest) == 
> deadNode) {
> +      TRACE_5("Discarding Adm Impl continuation %llu", ci3->first);
> +      ci3 = sAdmImplContinuationMap.erase(ci3);
> +    } else {
> +      ++ci3;
> +    }
> +  }
> +
> +  /* Discard Search Impl continuation */
> +  for (ci3 = sSearchImplContinuationMap.begin();
> +       ci3 != sSearchImplContinuationMap.end();) {
> +    if (m_NCS_NODE_ID_FROM_MDS_DEST(ci3->second.mReply_dest) == 
> deadNode) {
> +      TRACE_5("Discarding Search Impl continuation %llu", ci3->first);
> +      ci3 = sSearchImplContinuationMap.erase(ci3);
> +    } else {
> +      ++ci3;
> +    }
> +  }
> +
>     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