List:Commits« Previous MessageNext Message »
From:Pekka Nousiainen Date:October 30 2012 7:40pm
Subject:bzr push into mysql-5.1-telco-7.1 branch (pekka.nousiainen:4634 to 4635)
View as plain text  
 4635 Pekka Nousiainen	2012-10-30 [merge]
      merge to 7.1

    modified:
      storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp
      storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
 4634 Frazer Clement	2012-10-30 [merge]
      Merge 7.0->7.1

    added:
      storage/ndb/src/kernel/vm/CountingSemaphore.hpp
    modified:
      storage/ndb/include/kernel/signaldata/DumpStateOrd.hpp
      storage/ndb/src/kernel/blocks/ERROR_codes.txt
      storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
      storage/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp
      storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
      storage/ndb/test/ndbapi/testLimits.cpp
      storage/ndb/test/run-test/daily-basic-tests.txt
=== modified file 'storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp'
--- a/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp	2012-10-24 11:04:41 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp	2012-10-30 10:57:45 +0000
@@ -1476,14 +1476,14 @@ private:
   void timeOutFoundFragLab(Signal* signal, Uint32 TscanConPtr);
   void timeOutLoopStartFragLab(Signal* signal, Uint32 TscanConPtr);
   int  releaseAndAbort(Signal* signal);
-  void findApiConnectFail(Signal* signal, Uint32 instanceKey);
+  void findApiConnectFail(Signal* signal);
   void findTcConnectFail(Signal* signal, Uint32 instanceKey);
-  void initApiConnectFail(Signal* signal, Uint32 instanceKey);
+  void initApiConnectFail(Signal* signal);
   void initTcConnectFail(Signal* signal, Uint32 instanceKey);
   void initTcFail(Signal* signal);
   void releaseTakeOver(Signal* signal);
   void setupFailData(Signal* signal);
-  void updateApiStateFail(Signal* signal, Uint32 instanceKey);
+  void updateApiStateFail(Signal* signal);
   void updateTcStateFail(Signal* signal, Uint32 instanceKey);
   void handleApiFailState(Signal* signal, UintR anApiConnectptr);
   void handleFailedApiNode(Signal* signal,
@@ -1990,6 +1990,9 @@ public:
     bool insert_in_commit_ack_marker(Dbtc *tc,
                                      Uint32 instanceKey,
                                      NodeId nodeId);
+    // insert all keys when exact keys not known
+    bool insert_in_commit_ack_marker_all(Dbtc *tc,
+                                         NodeId nodeId);
   };
 
 private:

=== modified file 'storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2012-10-27 11:45:58 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2012-10-30 10:57:45 +0000
@@ -4280,6 +4280,17 @@ Dbtc::CommitAckMarker::insert_in_commit_
   LocalDataBuffer<5> tmp(pool, this->theDataBuffer);
   return tmp.append(&item, (Uint32)1);
 }
+bool
+Dbtc::CommitAckMarker::insert_in_commit_ack_marker_all(Dbtc *tc,
+                                                       NodeId node_id)
+{
+  for (Uint32 ikey = 1; ikey <= MAX_NDBMT_LQH_THREADS; ikey++)
+  {
+    if (!insert_in_commit_ack_marker(tc, ikey, node_id))
+      return false;
+  }
+  return true;
+}
 
 void Dbtc::execLQHKEYCONF(Signal* signal) 
 {
@@ -8946,19 +8957,7 @@ void Dbtc::execLQH_TRANSCONF(Signal* sig
     }
   }
 
-  Uint32 instanceKey;
-
-  if (unlikely(signal->getLength() < LqhTransConf::SignalLength_FRAG_ID))
-  {
-    jam();
-    instanceKey = 0;
-  }
-  else
-  {
-    jam();
-    instanceKey = getInstanceKey(tableId, fragId);
-  }
-  findApiConnectFail(signal, instanceKey);
+  findApiConnectFail(signal);
 
   if(apiConnectptr.p->ndbapiBlockref == 0 && tapplRef != 0){
     apiConnectptr.p->ndbapiBlockref = ref;
@@ -8968,6 +8967,19 @@ void Dbtc::execLQH_TRANSCONF(Signal* sig
   if (ttransStatus != LqhTransConf::Marker)
   {
     jam();
+
+    Uint32 instanceKey;
+
+    if (unlikely(signal->getLength() < LqhTransConf::SignalLength_FRAG_ID))
+    {
+      jam();
+      instanceKey = 0;
+    }
+    else
+    {
+      jam();
+      instanceKey = getInstanceKey(tableId, fragId);
+    }
     findTcConnectFail(signal, instanceKey);
   }
 }//Dbtc::execLQH_TRANSCONF()
@@ -9798,7 +9810,7 @@ void Dbtc::toCompleteHandlingLab(Signal*
 /*       YET THEN SEIZE A NEW API CONNECT RECORD AND LINK IT  */
 /*       INTO THE HASH TABLE.                                 */
 /*------------------------------------------------------------*/
-void Dbtc::findApiConnectFail(Signal* signal, Uint32 instanceKey) 
+void Dbtc::findApiConnectFail(Signal* signal) 
 {
   ApiConnectRecordPtr fafPrevApiConnectptr;
   ApiConnectRecordPtr fafNextApiConnectptr;
@@ -9829,7 +9841,7 @@ FAF_LOOP:
       fafPrevApiConnectptr.p->nextApiConnect = apiConnectptr.i;
     }//if
     apiConnectptr.p->nextApiConnect = RNIL;
-    initApiConnectFail(signal, instanceKey);
+    initApiConnectFail(signal);
   } else {
     jam();
     fafPrevApiConnectptr.i = fafNextApiConnectptr.i;
@@ -9842,7 +9854,7 @@ FAF_LOOP:
         (apiConnectptr.p->transid[0] != ttransid1)) {
       goto FAF_LOOP;
     }//if
-    updateApiStateFail(signal, instanceKey);
+    updateApiStateFail(signal);
   }//if
 }//Dbtc::findApiConnectFail()
 
@@ -9885,7 +9897,7 @@ void Dbtc::findTcConnectFail(Signal* sig
 /*----------------------------------------------------------*/
 /*       INITIALISE AN API CONNECT FAIL RECORD              */
 /*----------------------------------------------------------*/
-void Dbtc::initApiConnectFail(Signal* signal, Uint32 instanceKey) 
+void Dbtc::initApiConnectFail(Signal* signal) 
 {
   apiConnectptr.p->transid[0] = ttransid1;
   apiConnectptr.p->transid[1] = ttransid2;
@@ -9940,7 +9952,7 @@ void Dbtc::initApiConnectFail(Signal* si
     CommitAckMarkerBuffer::DataBufferPool & pool =
       c_theCommitAckMarkerBufferPool;
     LocalDataBuffer<5> head(pool, tmp.p->theDataBuffer);
-    ndbrequire(tmp.p->insert_in_commit_ack_marker(this, instanceKey, tnodeid));
+    ndbrequire(tmp.p->insert_in_commit_ack_marker_all(this, tnodeid));
 
 #if defined VM_TRACE || defined ERROR_INSERT
     {
@@ -10086,7 +10098,7 @@ void Dbtc::setupFailData(Signal* signal)
 /*----------------------------------------------------------*/
 /*       UPDATE THE STATE OF THE API CONNECT FOR THIS PART.   */
 /*----------------------------------------------------------*/
-void Dbtc::updateApiStateFail(Signal* signal, Uint32 instanceKey) 
+void Dbtc::updateApiStateFail(Signal* signal) 
 {
   if(LqhTransConf::getMarkerFlag(treqinfo))
   {
@@ -10123,7 +10135,7 @@ void Dbtc::updateApiStateFail(Signal* si
       ndbassert(tmp.p->transid1 == ttransid1);
       ndbassert(tmp.p->transid2 == ttransid2);
     }
-    ndbrequire(tmp.p->insert_in_commit_ack_marker(this, instanceKey, tnodeid));
+    ndbrequire(tmp.p->insert_in_commit_ack_marker_all(this, tnodeid));
   }
 
   switch (ttransStatus) {

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.1 branch (pekka.nousiainen:4634 to 4635) Pekka Nousiainen16 Nov