osaf/services/saf/immsv/immd/immd_proc.c  |  12 +++++++++++-
 osaf/services/saf/immsv/immnd/ImmModel.cc |   4 ++--
 2 files changed, 13 insertions(+), 3 deletions(-)


If after loadin-arbitration is done, loading is started but fails (for example
due to a corrupt sqlite file) then the IMMNDs are restarted but not IMMDs.
The already collected loading arbitration info in the active IMMD is not
cleared and in the next loading attempt the loading arbitration will only wait
for the stats from one of the SCs, then find it already has stats from both
SC's but actually one of them will be stats from the previous load (!).
This can result in incorrect arbitration. The file for which loading fails
will have been moved to imm.db.xxxxx.failed and thus not used for arbitration.
The fallback file is typically much older, but that may be masked by the
old preload stats for that SC. The preload stats need to be cleared here
when and if loading is restarted.

diff --git a/osaf/services/saf/immsv/immd/immd_proc.c 
b/osaf/services/saf/immsv/immd/immd_proc.c
--- a/osaf/services/saf/immsv/immd/immd_proc.c
+++ b/osaf/services/saf/immsv/immd/immd_proc.c
@@ -127,8 +127,18 @@ void immd_proc_immd_reset(IMMD_CB *cb, b
        cb->mRulingEpoch = 0;
        cb->immnd_coord = 0;
        cb->fevsSendCount = 0LL;
-       
+
+       cb->locPbe.epoch = 0;
+       cb->locPbe.maxCcbId = 0;
+       cb->locPbe.maxCommitTime =  0;
+       cb->locPbe.maxWeakCcbId = 0LL;
+       cb->locPbe.maxWeakCommitTime = 0;
+       cb->remPbe = cb->locPbe;
+       cb->m2PbeCanLoad = false;
+       cb->m2PbeExtraWait = false;
+
        cb->mRim = SA_IMM_INIT_FROM_FILE; /* Reset to default since we are 
reloading. */
+       /* Discard immnd node info ? */
 
        TRACE_LEAVE();
 }
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
@@ -4779,7 +4779,7 @@ ImmModel::ccbTerminate(SaUint32T ccbId)
                         getObjectName(grandParent, gpDn);
                         osafassert(grandParent->mChildCount >= 
(afim->mChildCount + 1));
                         --grandParent->mChildCount;
-                        LOG_IN("Childcount for (grand)parent %s of aborted 
create %s "
+                        TRACE_2("Childcount for (grand)parent %s of aborted 
create %s "
                                "decremented to %u", gpDn.c_str(), dn.c_str(), 
                                 grandParent->mChildCount);
                         grandParent = grandParent->mParent;
@@ -14662,7 +14662,7 @@ ImmModel::finalizeSync(ImmsvOmFinalizeSy
                 if(i2==sOwnerVector.end()) {
                     LOG_WA("Missing Admin Owner with id:%u in sync-verify "
                            "can happen after pre-loading (2PBE)", ai->id);
-                    osafassert(ai->id  < 3); /* admoId 1 & 2 used in preload. 
*/
+                    osafassert(ai->id  < 10); /* Initial admoId used in 2PBE 
preload. */
                     continue;
                 }
 

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to