List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:November 5 2009 8:46pm
Subject:bzr commit into mysql-5.1-telco-6.3 branch (jonas:3158) Bug#48584
View as plain text  
#At file:///home/jonas/src/telco-6.3/ based on revid:jonas@stripped

 3158 Jonas Oreland	2009-11-05
      ndb - bug#48584 - fix master lcp take-over bug

    modified:
      storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
=== modified file 'storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2009-11-02 17:09:12 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2009-11-05 20:46:28 +0000
@@ -6727,7 +6727,12 @@ void Dbdih::MASTER_LCPhandling(Signal* s
 #endif
       SYSFILE->latestLCP_ID--;
     }//if
-    storeNewLcpIdLab(signal);
+
+    {
+      Mutex mutex(signal, c_mutexMgr, c_fragmentInfoMutex_lcp);
+      Callback c = { safe_cast(&Dbdih::lcpFragmentMutex_locked), 0 };
+      ndbrequire(mutex.lock(c, false));
+    }
     break;
   case LMTOS_ALL_ACTIVE:
     {
@@ -9487,12 +9492,14 @@ void Dbdih::execSTART_LCP_REQ(Signal* si
   c_lcpState.m_participatingLQH = req->participatingLQH;
   
   c_lcpState.m_LCP_COMPLETE_REP_Counter_LQH = req->participatingLQH;
-  if(isMaster()){
+  if(isMaster())
+  {
     jam();
-    ndbrequire(isActiveMaster());
     c_lcpState.m_LCP_COMPLETE_REP_Counter_DIH = req->participatingDIH;
-
-  } else {
+  } 
+  else
+  {
+    jam();
     c_lcpState.m_LCP_COMPLETE_REP_Counter_DIH.clearWaitingFor();
   }
 
@@ -11100,6 +11107,9 @@ Dbdih::lcpFragmentMutex_locked(Signal* s
   c_lcpState.m_start_time = c_current_time;
   
   setLcpActiveStatusStart(signal);
+
+  c_lcpState.keepGci = m_micro_gcp.m_old_gci >> 32;
+  c_lcpState.oldestRestorableGci = SYSFILE->oldestRestorableGCI;
   
   signal->theData[0] = DihContinueB::ZCALCULATE_KEEP_GCI;
   signal->theData[1] = 0;  /* TABLE ID = 0          */
@@ -11258,6 +11268,17 @@ Dbdih::startLcpMutex_locked(Signal* sign
 void
 Dbdih::sendSTART_LCP_REQ(Signal* signal, Uint32 nodeId, Uint32 extra){
   BlockReference ref = calcDihBlockRef(nodeId);
+  if (ERROR_INSERTED(7021) && nodeId == getOwnNodeId())
+  {
+    sendSignalWithDelay(ref, GSN_START_LCP_REQ, signal, 500, 
+                        StartLcpReq::SignalLength);
+    return;
+  }
+  else if (ERROR_INSERTED(7021) && ((rand() % 10) > 4))
+  {
+    infoEvent("Dont sent STARTLCPREQ to %u", nodeId);
+    return;
+  }
   sendSignal(ref, GSN_START_LCP_REQ, signal, StartLcpReq::SignalLength, JBB);
 }
 


Attachment: [text/bzr-bundle] bzr/jonas@mysql.com-20091105204628-ao3428y2zk0i90o3.bundle
Thread
bzr commit into mysql-5.1-telco-6.3 branch (jonas:3158) Bug#48584Jonas Oreland5 Nov