Additional comments (fifth review mail for #49).
This is the final mail for this RR, i.e. this set of patches.

21) ImmModel::ccbObjectModify



+        s1.clear();
+        s2.clear();
+        // Exclude objects for adding from the original object
Better:
       //Create the set s1 of  references so far cumalively addedd by 
this CCB.
+        std::set_difference(afimPostOpNDRefs.begin(), 
afimPostOpNDRefs.end(), origNDRefs.begin(), origNDRefs.end(),
+                std::inserter(s1, s1.end()));
-------------------------------------------------------------

+        // Exclude object for adding that are already added
Better:
         //Create the set  s2 of references UNIQUELY added by the latest 
afim
+        std::set_difference(s1.begin(), s1.end(), 
afimPreOpNDRefs.begin(), afimPreOpNDRefs.end(),
+                std::inserter(s2, s2.end()));

--------------------------------------------------------------

+        // Add new object references
Better:

   //Adjust sReverse.....MMap for the dynamic change done by this latest 
modification  in the CCB.
   //Add the NDRefs that whre UNIQUELY added by the latest modify of 
this object in this ccb.

+        for(it=s2.begin(); it!=s2.end(); ++it) {
+            omi = sObjectMap.find(*it);
+            if(omi != sObjectMap.end()) {

---------------------------------------------------------

A general comment:
All of the above set algebra could have been done using ObjectSets 
instead of ObjectNameSets.
That is sets of pointers to ObjectInfo instead of sets of strings.
This would be more efficient both in execution and in memory.
We know this can be done. Because we are deealing with NO_DANGLING refs, 
we know the
object exists as an ObjectInfo struct.
But optimizing this stuff can be done later, if needed.
---------------------------------------------------------------------------------------
22) ImmModel::deleteObject

            // Check NO_DANGLING references for PRTO
            if(std::find_if(oi->second->mClassInfo->mAttrMap.begin(),
                            oi->second->mClassInfo->mAttrMap.end(),
                            AttrFlagIncludes(SA_IMM_ATTR_PERSISTENT)) != 
oi->second->mClassInfo->mAttrMap.end()) {
                ObjectMMap::iterator ommi = 
sReverseRefObjectMMap.find(oi->second);
                if(ommi != sReverseRefObjectMMap.end()) {
                    while(ommi != sReverseRefObjectMMap.end() && 
ommi->first == oi->second) {
                        if((ommi->second->mObjFlags & IMM_DELETE_LOCK) 
&& (ommi->second->mCcbId == ccb->mId)) {
                            ++ommi;
                            continue;
                        } else {
                            LOG_NO("ERR_BAD_OPERATION: There is at least 
one object that has NO_DANGLING reference to the deleting object");

Logic appears correct but the log message must be changed to include 
more information and reformulated. Here it sounds like some object
is the agent doing deletion. Suggest:

    LOG_NO("ERR_BAD_OPERATION: PRTO '%s' cant be deleted by CCB(%u) 
because another object '%s' has a NO_DANGLING reference to it",...)

----------------------

+    } else {    // Config object
...
+                        LOG_IN("ERR_BUSY: Dependent object is going to 
be deleted in another CCB");
should be:
+                        LOG_IN("ERR_BUSY: Ccb(%u) delete of 
object:'%s'  is scheduled to be deleted in another CCB(%u)",...);
-----------------------------------------
+                        LOG_NO("ERR_BAD_OPERATION: The dependent object 
will be created in the same CCB");
should be:
+                        LOG_NO("ERR_BAD_OPERATION: Ccb(%u) delete of 
object '%s' created in the same Ccb - not allowed",....);
---------------------------------------
+                        LOG_IN("ERR_BUSY: Dependent object is created 
in another CCB");
should be:
+                        LOG_IN("ERR_BUSY: Ccb(%u) delete of object '%s' 
that is being created in another CCB(%u)",......);
--------------------------------------------


23) ImmModel::deleteRtObject

+        if(sReverseRefObjectMMap.find(object) != 
sReverseRefObjectMMap.end()) {
+            TRACE("ERR_BAD_OPERATION: The object has NO_DANGLING 
reference from another object");
should be:
+            TRACE("ERR_BAD_OPERATION: Object '%s' is the target of a 
NO_DANGLING reference in config object '%s'",.....);


---------------------------------

Thats it!
I am done!

/AndersBj




------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&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