List:Commits« Previous MessageNext Message »
From:jonas Date:December 1 2006 9:37am
Subject:bk commit into 5.1 tree (jonas:1.2335) BUG#24717
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, 2006-12-01 09:37:17+01:00, jonas@stripped +7 -0
  ndb - bug#24717
    5.1 version
    remove 5.0 version
    add general routing signal
    send tckeyref routed if needed...

  storage/ndb/include/kernel/GlobalSignalNumbers.h@stripped, 2006-12-01 09:37:15+01:00,
jonas@stripped +1 -2
    Add general routing signal

  storage/ndb/include/kernel/signaldata/RouteOrd.hpp@stripped, 2006-12-01 09:37:15+01:00,
jonas@stripped +35 -0
    New BitKeeper file ``storage/ndb/include/kernel/signaldata/RouteOrd.hpp''

  storage/ndb/include/kernel/signaldata/RouteOrd.hpp@stripped, 2006-12-01 09:37:15+01:00,
jonas@stripped +0 -0

  storage/ndb/src/common/debugger/signaldata/SignalNames.cpp@stripped, 2006-12-01
09:37:15+01:00, jonas@stripped +2 -0
    Add general routing signal

  storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp@stripped, 2006-12-01 09:37:15+01:00,
jonas@stripped +27 -7
    send TCKEYREF routed if needed

  storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp@stripped, 2006-12-01 09:37:15+01:00,
jonas@stripped +2 -4
    add general routing 
    remove node started state

  storage/ndb/src/kernel/blocks/dbtc/DbtcInit.cpp@stripped, 2006-12-01 09:37:15+01:00,
jonas@stripped +1 -1
    add general routing 
    remove node started state

  storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp@stripped, 2006-12-01 09:37:15+01:00,
jonas@stripped +56 -35
    add general routing 
    remove node started state
    remove "avoid sending committed read to early" as it now should be handled correctly

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	jonas
# Host:	perch.ndb.mysql.com
# Root:	/home/jonas/src/51-work
--- New file ---
+++ storage/ndb/include/kernel/signaldata/RouteOrd.hpp	06/12/01 09:37:15
/* Copyright (C) 2003 MySQL AB

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */

#ifndef ROUTE_ORD_HPP
#define ROUTE_ORD_HPP

#include "SignalData.hpp"
#include <NodeBitmask.hpp>

/**
 * Request to allocate node id
 */
struct RouteOrd {
  STATIC_CONST( SignalLength = 4 );

  Uint32 dstRef;
  Uint32 srcRef;
  Uint32 gsn;
  Uint32 cnt;
};

#endif


--- 1.29/storage/ndb/include/kernel/GlobalSignalNumbers.h	2006-12-01 09:37:22 +01:00
+++ 1.30/storage/ndb/include/kernel/GlobalSignalNumbers.h	2006-12-01 09:37:22 +01:00
@@ -126,7 +126,6 @@
 #define GSN_ACC_ABORTCONF               67
 /* 68 not unused */
 /* 69 not unused */
-/* 70 unused */
 #define GSN_UPDATE_FRAG_DIST_KEY_ORD    70
 #define GSN_ACC_ABORTREQ                71
 #define GSN_ACC_CHECK_SCAN              72
@@ -183,7 +182,7 @@
 #define GSN_CNTR_START_CONF             118
 #define GSN_CNTR_START_REP              119
 /* 120 not unused */
-/* 121 unused */
+#define GSN_ROUTE_ORD                   121
 /* 122 unused */
 /* 123 unused */
 /* 124 unused */

--- 1.14/storage/ndb/src/common/debugger/signaldata/SignalNames.cpp	2006-12-01 09:37:22
+01:00
+++ 1.15/storage/ndb/src/common/debugger/signaldata/SignalNames.cpp	2006-12-01 09:37:22
+01:00
@@ -635,5 +635,7 @@
 
   ,{ GSN_UPDATE_FRAG_DIST_KEY_ORD, "UPDATE_FRAG_DIST_KEY_ORD" }
   ,{ GSN_DICT_COMMIT_REQ,  "DICT_COMMIT_REQ"}
+
+  ,{ GSN_ROUTE_ORD, "ROUTE_ORD" }
 };
 const unsigned short NO_OF_SIGNAL_NAMES = sizeof(SignalNames)/sizeof(GsnName);

--- 1.126/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2006-12-01 09:37:22 +01:00
+++ 1.127/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2006-12-01 09:37:22 +01:00
@@ -62,6 +62,7 @@
 #include <signaldata/KeyInfo.hpp>
 #include <signaldata/AttrInfo.hpp>
 #include <KeyDescriptor.hpp>
+#include <signaldata/RouteOrd.hpp>
 
 // Use DEBUG to print messages that should be
 // seen only when we debug the product
@@ -7337,13 +7338,32 @@
   }
   else
   {
-    jam();
-    memmove(signal->theData + 3, signal->theData, 4*TcKeyRef::SignalLength);
-    signal->theData[0] = ZRETRY_TCKEYREF;
-    signal->theData[1] = cnt + 1;
-    signal->theData[2] = ref;
-    sendSignalWithDelay(reference(), GSN_CONTINUEB, signal, 100,
-			TcKeyRef::SignalLength + 3);
+    if (routeRef && 
+	getNodeInfo(refToNode(routeRef)).m_version >= MAKE_VERSION(5,1,14))
+    {
+      jam();
+      memmove(signal->theData+25, signal->theData, 4*TcKeyRef::SignalLength);
+      RouteOrd* ord = (RouteOrd*)signal->getDataPtrSend();
+      ord->dstRef = ref;
+      ord->srcRef = reference();
+      ord->gsn = GSN_TCKEYREF;
+      ord->cnt = 0;
+      LinearSectionPtr ptr[3];
+      ptr[0].p = signal->theData+25;
+      ptr[0].sz = TcKeyRef::SignalLength;
+      sendSignal(routeRef, GSN_ROUTE_ORD, signal, RouteOrd::SignalLength, JBB,
+		 ptr, 1);
+    }
+    else
+    {
+      jam();
+      memmove(signal->theData + 3, signal->theData, 4*TcKeyRef::SignalLength);
+      signal->theData[0] = ZRETRY_TCKEYREF;
+      signal->theData[1] = cnt + 1;
+      signal->theData[2] = ref;
+      sendSignalWithDelay(reference(), GSN_CONTINUEB, signal, 100,
+			  TcKeyRef::SignalLength + 3);
+    }
   }
 }
 

--- 1.43/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp	2006-12-01 09:37:22 +01:00
+++ 1.44/storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp	2006-12-01 09:37:22 +01:00
@@ -945,8 +945,7 @@
       NF_CHECK_SCAN        = 0x2,
       NF_CHECK_TRANSACTION = 0x4,
       NF_CHECK_DROP_TAB    = 0x8,
-      NF_NODE_FAIL_BITS    = 0xF, // All bits...
-      NF_STARTED           = 0x10
+      NF_NODE_FAIL_BITS    = 0xF // All bits...
     };
     Uint32 m_nf_bits;
     NdbNodeBitmask m_lqh_trans_conf;
@@ -1286,7 +1285,7 @@
   void execLQHKEYREF(Signal* signal);
   void execTRANSID_AI_R(Signal* signal);
   void execKEYINFO20_R(Signal* signal);
-
+  void execROUTE_ORD(Signal* signal);
   // Received signals
   void execDUMP_STATE_ORD(Signal* signal);
   void execSEND_PACKED(Signal* signal);
@@ -1324,7 +1323,6 @@
   void execCOMMITCONF(Signal* signal);
   void execABORTCONF(Signal* signal);
   void execNODE_FAILREP(Signal* signal);
-  void execNODE_START_REP(Signal* signal);
   void execINCL_NODEREQ(Signal* signal);
   void execTIME_SIGNAL(Signal* signal);
   void execAPI_FAILREQ(Signal* signal);

--- 1.17/storage/ndb/src/kernel/blocks/dbtc/DbtcInit.cpp	2006-12-01 09:37:22 +01:00
+++ 1.18/storage/ndb/src/kernel/blocks/dbtc/DbtcInit.cpp	2006-12-01 09:37:22 +01:00
@@ -279,7 +279,7 @@
   addRecSignal(GSN_WAIT_DROP_TAB_CONF, &Dbtc::execWAIT_DROP_TAB_CONF);
   
   addRecSignal(GSN_ALTER_TAB_REQ, &Dbtc::execALTER_TAB_REQ);
-  addRecSignal(GSN_NODE_START_REP, &Dbtc::execNODE_START_REP, true);
+  addRecSignal(GSN_ROUTE_ORD, &Dbtc::execROUTE_ORD);
   
   cacheRecord = 0;
   apiConnectRecord = 0;

--- 1.126/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2006-12-01 09:37:22 +01:00
+++ 1.127/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2006-12-01 09:37:22 +01:00
@@ -72,6 +72,8 @@
 #include <NdbOut.hpp>
 #include <DebuggerNames.hpp>
 
+#include <signaldata/RouteOrd.hpp>
+
 // Use DEBUG to print messages that should be
 // seen only when we debug the product
 #ifdef VM_TRACE
@@ -3051,28 +3053,7 @@
 	  }//if
 	}//for
       }
-
-      if (regTcPtr->tcNodedata[0] != getOwnNodeId())
-      {
-	jam();
-	for (Uint32 i = 0; i < tnoOfBackup + 1; i++)
-	{
-	  HostRecordPtr hostPtr;
-	  hostPtr.i = regTcPtr->tcNodedata[i];
-	  ptrCheckGuard(hostPtr, chostFilesize, hostRecord);
-	  if (hostPtr.p->m_nf_bits & HostRecord::NF_STARTED)
-	  {
-	    jam();
-	    if (i != 0)
-	    {
-	      jam();
-	      regTcPtr->tcNodedata[0] = hostPtr.i;
-	    }
-	    break;
-	  }
-	}
-      }//if
-    }
+    }//if
     jam();
     regTcPtr->lastReplicaNo = 0;
     regTcPtr->noOfNodes = 1;
@@ -7030,19 +7011,6 @@
 }//Dbtc::execNODE_FAILREP()
 
 void
-Dbtc::execNODE_START_REP(Signal* signal)
-{
-  Uint32 nodeId = signal->theData[0];
-  hostptr.i = nodeId;
-  ptrCheckGuard(hostptr, chostFilesize, hostRecord);
-  if (hostptr.p->m_nf_bits == 0)
-  {
-    jam();
-    hostptr.p->m_nf_bits |= HostRecord::NF_STARTED;
-  }
-}
-
-void
 Dbtc::checkNodeFailComplete(Signal* signal, 
 			    Uint32 failedNodeId,
 			    Uint32 bit)
@@ -13345,3 +13313,56 @@
   return 0;
 }
 
+void
+Dbtc::execROUTE_ORD(Signal* signal)
+{
+  jamEntry();
+  if(!assembleFragments(signal)){
+    jam();
+    return;
+  }
+
+  RouteOrd* ord = (RouteOrd*)signal->getDataPtr();
+  Uint32 dstRef = ord->dstRef;
+  Uint32 srcRef = ord->srcRef;
+  Uint32 gsn = ord->gsn;
+  Uint32 cnt = ord->cnt;
+
+  if (likely(getNodeInfo(refToNode(dstRef)).m_connected))
+  {
+    jam();
+    Uint32 secCount = signal->getNoOfSections();
+    SegmentedSectionPtr ptr[3];
+    ndbrequire(secCount >= 1 && secCount <= 3);
+
+    jamLine(secCount);
+    for (Uint32 i = 0; i<secCount; i++)
+      signal->getSection(ptr[i], i);
+
+    /**
+     * Put section 0 in signal->theData
+     */
+    ndbrequire(ptr[0].sz <= 25);
+    copy(signal->theData, ptr[0]);
+
+    signal->header.m_noOfSections = 0;
+    
+    /**
+     * Shift rest of sections
+     */
+    for(Uint32 i = 1; i<secCount; i++)
+    {
+      signal->setSection(ptr[i], i - 1);
+    }
+
+    sendSignal(dstRef, gsn, signal, ptr[0].sz, JBB);
+
+    signal->header.m_noOfSections = 0;
+    signal->setSection(ptr[0], 0);
+    releaseSections(signal);
+    return ;
+  }
+
+  warningEvent("Unable to route GSN: %d from %x to %x",
+	       gsn, srcRef, dstRef);
+}
Thread
bk commit into 5.1 tree (jonas:1.2335) BUG#24717jonas1 Dec