List:Commits« Previous MessageNext Message »
From:jonas Date:December 19 2007 7:46pm
Subject:bk commit into 5.1 tree (jonas:1.2808)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of jonas.  When jonas does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-12-19 20:46:43+01:00, jonas@stripped +2 -0
  ndb pnr -
    fix upgrade

  storage/ndb/include/ndb_version.h.in@stripped, 2007-12-19 20:46:39+01:00, jonas@stripped +1 -1
    guess version for ndb pnr

  storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp@stripped, 2007-12-19 20:46:39+01:00, jonas@stripped +37 -7
    Fix upgrade for parallel node recovery

diff -Nrup a/storage/ndb/include/ndb_version.h.in b/storage/ndb/include/ndb_version.h.in
--- a/storage/ndb/include/ndb_version.h.in	2007-11-23 13:50:41 +01:00
+++ b/storage/ndb/include/ndb_version.h.in	2007-12-19 20:46:39 +01:00
@@ -160,7 +160,7 @@ ndb_check_prep_copy_frag_version(Uint32 
   return 0;
 }
 
-#define NDBD_PNR NDB_MAKE_VERSION(6,3,7)
+#define NDBD_PNR NDB_MAKE_VERSION(6,3,8)
 
 static 
 inline
diff -Nrup a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
--- a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2007-12-18 14:19:41 +01:00
+++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2007-12-19 20:46:39 +01:00
@@ -124,7 +124,7 @@ static
 Uint32
 nextLcpNo(Uint32 lcpNo){
   lcpNo++;
-  if(lcpNo == MAX_LCP_USED)
+  if(lcpNo >= MAX_LCP_USED)
     return 0;
   return lcpNo;
 }
@@ -1553,8 +1553,19 @@ void Dbdih::execNDB_STTOR(Signal* signal
         req->senderData = RNIL;
         req->flags = StartCopyReq::WAIT_LCP;
         req->startingNodeId = getOwnNodeId();
-        sendSignal(reference(), GSN_START_COPYREQ, signal, 
-                   StartCopyReq::SignalLength, JBB);
+        if (!ndb_pnr(getNodeInfo(refToNode(cmasterdihref)).m_version))
+        {
+          jam();
+          infoEvent("Detecting upgrade: Master(%u) does not support parallel node recovery",
+                    refToNode(cmasterdifref));
+          sendSignal(cmasterdihref, GSN_START_COPYREQ, signal, 
+                     StartCopyReq::SignalLength, JBB);
+        }
+        else
+        {
+          sendSignal(reference(), GSN_START_COPYREQ, signal, 
+                     StartCopyReq::SignalLength, JBB);
+        }
       }
       return;
     }
@@ -2028,6 +2039,12 @@ void Dbdih::execSTART_COPYCONF(Signal* s
   Uint32 nodeId = conf->startingNodeId;
   Uint32 senderData = conf->senderData;
 
+  if (!ndb_pnr(getNodeInfo(refToNode(signal->getSendersBlockRef())).m_version))
+  {
+    jam();
+    senderData = RNIL;
+  }
+  
   if (senderData == RNIL)
   {
     /**
@@ -3136,7 +3153,6 @@ void Dbdih::execEND_TOREQ(Signal* signal
 
   Uint32 nodeId = refToNode(req.senderRef);
   TakeOverRecordPtr takeOverPtr;
-  ndbrequire(findTakeOver(takeOverPtr, nodeId));
 
   if (ndb_pnr(getNodeInfo(nodeId).m_version))
   {
@@ -3144,6 +3160,7 @@ void Dbdih::execEND_TOREQ(Signal* signal
     /**
      * 
      */
+    ndbrequire(findTakeOver(takeOverPtr, nodeId));
     NodeRecordPtr nodePtr;
     nodePtr.i = nodeId;
     ptrCheckGuard(nodePtr, MAX_NDB_NODES, nodeRecord);
@@ -3162,9 +3179,9 @@ void Dbdih::execEND_TOREQ(Signal* signal
       return;
     }
     nodePtr.p->copyCompleted = 1;
+    releaseTakeOver(takeOverPtr);
   }
   
-  releaseTakeOver(takeOverPtr);
   EndToConf * conf = (EndToConf *)&signal->theData[0];
   conf->senderData = req.senderData;
   conf->sendingNodeId = cownNodeId;
@@ -3196,6 +3213,12 @@ void Dbdih::execCREATE_FRAGREQ(Signal* s
   Uint32 replicaType = req->replicaType;
   Uint32 tFailedNodeId = req->failedNodeId;
 
+  if (!ndb_pnr(getNodeInfo(refToNode(senderRef)).m_version))
+  {
+    jam();
+    tFailedNodeId = tdestNodeid;
+  }
+  
   FragmentstorePtr fragPtr;
   getFragstore(tabPtr.p, fragId, fragPtr);
   RETURN_IF_NODE_NOT_ALIVE(tdestNodeid);
@@ -11145,8 +11168,15 @@ Dbdih::handle_invalid_lcp_no(const LcpFr
   Uint32 lcpNo = rep->lcpNo;
   Uint32 lcpId = rep->lcpId;
 
-  warningEvent("Detected previous node failure of %d during lcp",
-	       rep->nodeId);
+  if (!ndb_pnr(getNodeInfo(refToNode(cmasterdihref)).m_version))
+  {
+  }
+  else
+  {
+    warningEvent("Detected previous node failure of %d during lcp",
+                 rep->nodeId);
+  }
+  
   replicaPtr.p->nextLcp = lcpNo;
   replicaPtr.p->lcpId[lcpNo] = 0;
   replicaPtr.p->lcpStatus[lcpNo] = ZINVALID;
Thread
bk commit into 5.1 tree (jonas:1.2808)jonas19 Dec