List:Internals« Previous MessageNext Message »
From:jonas.oreland Date:April 18 2005 12:41pm
Subject:bk commit into 4.1 tree (joreland:1.2179) BUG#9892
View as plain text  
Below is the list of changes that have just been committed into a local
4.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
  1.2179 05/04/18 12:41:12 joreland@stripped +3 -0
  bug#9892
    Make BUILDINDX RF_LOCAL aware

  ndb/test/ndbapi/testIndex.cpp
    1.13 05/04/18 12:41:09 joreland@stripped +1 -1
    Run only 1 update thread during NFNR2_O

  ndb/src/ndbapi/Ndbif.cpp
    1.25 05/04/18 12:41:09 joreland@stripped +4 -4
    allow TCKEY_FAILREF w/ invalid magic number also when NDB_NODROPPED_SIGNAL

  ndb/src/kernel/blocks/dbdict/Dbdict.cpp
    1.32 05/04/18 12:41:09 joreland@stripped +28 -9
    bug#9892
      Make BUILDINDX RF_LOCAL aware

# 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:	joreland
# Host:	eel.hemma.oreland.se.ndb.mysql.com
# Root:	/home/jonas/src/mysql-4.1

--- 1.31/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	Thu Mar 31 19:17:09 2005
+++ 1.32/ndb/src/kernel/blocks/dbdict/Dbdict.cpp	Mon Apr 18 12:41:09 2005
@@ -9811,11 +9811,20 @@
       requestType == BuildIndxReq::RT_ALTER_INDEX ||
       requestType == BuildIndxReq::RT_SYSTEMRESTART) {
     jam();
+
+    const bool isLocal = req->getRequestFlag() & RequestFlag::RF_LOCAL;
+    NdbNodeBitmask receiverNodes = c_aliveNodes;
+    if (isLocal) {
+      receiverNodes.clear();
+      receiverNodes.set(getOwnNodeId());
+    }
+    
     if (signal->getLength() == BuildIndxReq::SignalLength) {
       jam();
-      if (getOwnNodeId() != c_masterNodeId) {
+      
+      if (!isLocal && getOwnNodeId() != c_masterNodeId) {
         jam();
-
+	
 	releaseSections(signal);
 	OpBuildIndex opBad;
 	opPtr.p = &opBad;
@@ -9828,9 +9837,9 @@
       }
       // forward initial request plus operation key to all
       req->setOpKey(++c_opRecordSequence);
-      NodeReceiverGroup rg(DBDICT, c_aliveNodes);
+      NodeReceiverGroup rg(DBDICT, receiverNodes);
       sendSignal(rg, GSN_BUILDINDXREQ,
-          signal, BuildIndxReq::SignalLength + 1, JBB);
+		 signal, BuildIndxReq::SignalLength + 1, JBB);
       return;
     }
     // seize operation record
@@ -9853,7 +9862,7 @@
     }
     c_opBuildIndex.add(opPtr);
     // master expects to hear from all
-    opPtr.p->m_signalCounter = c_aliveNodes;
+    opPtr.p->m_signalCounter = receiverNodes;
     buildIndex_sendReply(signal, opPtr, false);
     return;
   }
@@ -10208,10 +10217,20 @@
   req->setConnectionPtr(opPtr.p->key);
   req->setRequestType(opPtr.p->m_requestType);
   req->addRequestFlag(opPtr.p->m_requestFlag);
-  opPtr.p->m_signalCounter = c_aliveNodes;
-  NodeReceiverGroup rg(DBDICT, c_aliveNodes);
-  sendSignal(rg, GSN_BUILDINDXREQ,
-      signal, BuildIndxReq::SignalLength, JBB);
+  if(opPtr.p->m_requestFlag & RequestFlag::RF_LOCAL)
+  {
+    opPtr.p->m_signalCounter.clearWaitingFor();
+    opPtr.p->m_signalCounter.setWaitingFor(getOwnNodeId());
+    sendSignal(reference(), GSN_BUILDINDXREQ,
+	       signal, BuildIndxReq::SignalLength, JBB);
+  }
+  else
+  {
+    opPtr.p->m_signalCounter = c_aliveNodes;
+    NodeReceiverGroup rg(DBDICT, c_aliveNodes);
+    sendSignal(rg, GSN_BUILDINDXREQ,
+	       signal, BuildIndxReq::SignalLength, JBB);
+  }
 }
 
 void

--- 1.24/ndb/src/ndbapi/Ndbif.cpp	Mon Dec 20 12:36:03 2004
+++ 1.25/ndb/src/ndbapi/Ndbif.cpp	Mon Apr 18 12:41:09 2005
@@ -453,7 +453,7 @@
       tFirstDataPtr = int2void(tFirstData);
       if(tFirstDataPtr != 0){
 	tOp = void2rec_op(tFirstDataPtr);
-	if (tOp->checkMagicNumber() == 0) {
+	if (tOp->checkMagicNumber(false) == 0) {
 	  tCon = tOp->theNdbCon;
 	  if (tCon != NULL) {
 	    if ((tCon->theSendStatus == NdbConnection::sendTC_OP) ||
@@ -466,11 +466,11 @@
 	    }//if
 	  }//if
 	}//if
-      } else {
+      }
 #ifdef VM_TRACE
-	ndbout_c("Recevied TCKEY_FAILREF wo/ operation");
+      ndbout_c("Recevied TCKEY_FAILREF wo/ operation");
 #endif
-      }
+      return;
       break;
     }
   case GSN_TCKEYREF:

--- 1.12/ndb/test/ndbapi/testIndex.cpp	Mon Nov  8 13:58:37 2004
+++ 1.13/ndb/test/ndbapi/testIndex.cpp	Mon Apr 18 12:41:09 2005
@@ -1329,7 +1329,7 @@
   INITIALIZER(runLoadTable);
   STEP(runRestarts);
   STEP(runTransactions2);
-  STEP(runTransactions2);
+  //STEP(runTransactions2);
   FINALIZER(runVerifyIndex);
   FINALIZER(createRandomIndex_Drop);
   FINALIZER(createPkIndex_Drop);
Thread
bk commit into 4.1 tree (joreland:1.2179) BUG#9892jonas.oreland18 Apr