Additional comments.

9) In checkNoDanglingReferencesModify (to be renamed 
validateNoDanglingRefsModify):

+                            LOG_NO("ERR_FAILED_OPERATION: NO_DANGLING 
reference (%s) does not exist",
+                                    av->getValueC_str());

Says the reference does not exist, but the reference exists, the problem 
is that it is dangling.
Also add tghe ccbId to assist troubleshooing.
So change to:

+                            LOG_NO("ERR_FAILED_OPERATION: NO_DANGLING 
reference (%s) is dangling (Ccb %u)",
+                                    av->getValueC_str(), ccb->mId);

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

+                                LOG_NO("ERR_FAILED_OPERATION: 
NO_DANGLING Reference (%s) "
+                                        "cannot be a non PRTO (Ccb %u)",

Change to:

+                                LOG_NO("ERR_FAILED_OPERATION: 
NO_DANGLING reference (%s) "
+                                        "refers to a non-persistent RTO 
(Ccb %u)",

-----------------------------------------
+                                LOG_ER("ERR_FAILED_OPERATION: 
NO_DANGLING reference (%s) is "
+                                        "flagged for deleting by 
another CCB",
+                                        av->getValueC_str());

Change to:

+                                LOG_ER("ERR_FAILED_OPERATION: 
NO_DANGLING reference (%s) "
+                                        "refers to object flagged for 
delete by another CCB: %u, (this Ccb %u)",
+                                        av->getValueC_str(), 
omi->second->mCcbId , ccb->mId);
-------------------------------------------------------------------------

+                        if((omi->second->mObjFlags & IMM_CREATE_LOCK) 
&& (omi->second->mCcbId != ccb->mId)) {
+                            TRACE_LEAVE();
+                            return SA_AIS_ERR_FAILED_OPERATION; // 
Create flag set by other CCB
+                        }

Should also have a log printout:

+                        if((omi->second->mObjFlags & IMM_CREATE_LOCK) 
&& (omi->second->mCcbId != ccb->mId)) {
                                 LOG_ER("ERR_FAILED_OPERATION: 
NO_DANGLING reference (%s) "
                                         "refers to object flagged for 
create by another CCB: %u, (this Ccb %u)",
                                         av->getValueC_str(), 
omi->second->mCcbId , ccb->mId);
+                            TRACE_LEAVE();
+                            return SA_AIS_ERR_FAILED_OPERATION;
+                        }
--------------------------------------
10)  In checkNoDanglingReferencesDelete  (to be renamed 
validateNoDanglingRefsDelete):

+    ObjectMap::iterator omi = sObjectMap.find(omit->first.c_str());
+    if(omi == sObjectMap.end()) {
+        TRACE_LEAVE();
+        return SA_AIS_OK;
+    }

To me it seems that something is wrong here.
How can there be a delete mutation in this ccb for an object that 
currently does not exist ?
This will in fact assert later in commitDelete.
May as well assert here

osafassert(omi != sObjectMap.end());

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

+        if(!(ommi->second->mObjFlags & IMM_DELETE_LOCK)) {
+            LOG_ER("ERR_FAILED_OPERATION: Object with NO_DANGLING 
reference to the deleting object "
+                   "is not flagged for the deletion");
+            rc = SA_AIS_ERR_FAILED_OPERATION;

Need to provide more information for troubleshooting. (I spontaneously 
thought we needed to check that the
other object is being deleted by the *same* ccb. But I that has already 
been checked in the interference check
at the operation stage..

+        if(!(ommi->second->mObjFlags & IMM_DELETE_LOCK)) {
+            LOG_ER("ERR_FAILED_OPERATION: Delete of object %s would 
violate NO_DANGLING reference "
                              "from object %s, not scheduled for delete 
by this CCB:%u",.............);
+            rc = SA_AIS_ERR_FAILED_OPERATION;

-----------------------------------------------------------------
+        if(ommi->second->mCcbId != ccb->mId) {
+            LOG_ER("ERR_FAILED_OPERATION: Object with NO_DANGLING 
reference to the deleting object "
+                   "is deleted by another CCB");

Has not this case already been already been checked/eliminated by the 
interference check
at the operation stage, of this ccb and/or the other ccb ?
If the check is redundant, then it should be made into an osafassert. 
If not, just use the same error log message as the previous one.
The problem being that the other object is not scheduled for delete by 
this ccb.
The fact that it happens to be scheduled for delete by another ccb is 
sort of not
relevant to what is wrong with *this* ccb.
-----------------------------------------------------------------------

Still a bit more comming.

/AndersBj



------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&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