Hi Neel,

The proposed patch will work logically, but it is not as efficient as it could 
be.
By changing 

        if(*spApplConnPtr) {

To:

        if(spApplConnPtr) {

Is the same as:

        if(true) {

That is the condition will always be true because the pointer itself is of 
course always 
provided. Note the:  osafassert(spApplConnPtr);

So you may in this variant just remove this if statement.

The body of the if statement builds up a vecor of object names to be used for 
sending
special applier callbacks for deleted PRTOs. There can theoretically be more 
than one
Because delete operations are cascading. There could be a subtree of PRTOs 
being deletd.

The vector is then build up here regardles of whether any special applier 
exists.
Copying the string names of the objects.
But if no special applier exists at this node (typically the case at all 
payloads),
Then the vector is just discarded later. So this causes wasted execution/memory.
In reality is probably not much. But wy waste if it is not necessary.

So I will Nack your patch and will send an alternate fix in a moment that goes 
back
to the original pattenrn of generating this vecor only if there is a special 
applier
at the node.

Note I do apreciate your effort in trying to understand this convoluted code.
It can not be easy.
For exampe on a 2PBE system, this function is entered twice,
once for the reply from each PBE.

Thanks
/AndersBj


-----Original Message-----
From: [email protected] [mailto:[email protected]] 
Sent: den 3 april 2014 16:29
To: Anders Björnerstedt
Cc: [email protected]
Subject: [PATCH 1 of 1] IMM:sending delete callback for PBE enabled RTobj 
delete [#835]

 osaf/services/saf/immsv/immnd/ImmModel.cc |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


when the RT Object is deleted in a PBE enabled cluster which is subscribed to 
special applier, the delete callback is not sent. with this patch the delete 
callback will be sent

diff --git a/osaf/services/saf/immsv/immnd/ImmModel.cc 
b/osaf/services/saf/immsv/immnd/ImmModel.cc
--- a/osaf/services/saf/immsv/immnd/ImmModel.cc
+++ b/osaf/services/saf/immsv/immnd/ImmModel.cc
@@ -13336,7 +13336,7 @@ SaInt32T ImmModel::pbePrtObjDeletesConti
             osafassert(oi != sObjectMap.end());
 
             if(oMut->mAfterImage->mObjFlags & IMM_RTNFY_FLAG) {
-                if(*spApplConnPtr) {
+                if(spApplConnPtr) {
                     if(oMut->mAfterImage->mObjFlags & IMM_DN_INTERNAL_REP) {
                         std::string tmpName(i2->first);
                         nameToExternal(tmpName);

------------------------------------------------------------------------------
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to