List:Commits« Previous MessageNext Message »
From:tomas Date:January 20 2006 8:11am
Subject:bk commit into 5.1 tree (tomas:1.2083)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas 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.2083 06/01/20 09:10:58 tomas@stripped +1 -0
  Merge tulin@stripped:/home/bk/mysql-5.1-new
  into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-new

  storage/ndb/src/kernel/blocks/suma/Suma.cpp
    1.33 06/01/20 09:10:50 tomas@stripped +0 -0
    Auto merged

# 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:	tomas
# Host:	poseidon.ndb.mysql.com
# Root:	/home/tomas/mysql-5.1-new/RESYNC

--- 1.32/storage/ndb/src/kernel/blocks/suma/Suma.cpp	2006-01-18 10:57:38 +01:00
+++ 1.33/storage/ndb/src/kernel/blocks/suma/Suma.cpp	2006-01-20 09:10:50 +01:00
@@ -44,6 +44,7 @@
 #include <signaldata/DropTab.hpp>
 #include <signaldata/AlterTab.hpp>
 #include <signaldata/DihFragCount.hpp>
+#include <signaldata/SystemError.hpp>
 
 #include <ndbapi/NdbDictionary.hpp>
 
@@ -690,7 +691,7 @@
   
   if(failed.get(Restart.nodeId))
   {
-    Restart.nodeId = 0;
+    Restart.resetRestart(signal);
   }
 
   signal->theData[0] = SumaContinueB::RESEND_BUCKET;
@@ -3758,7 +3759,33 @@
   jamEntry();
   DBUG_ENTER("Suma::execSUB_CREATE_REF");
   ndbassert(signal->getNoOfSections() == 0);
-  ndbrequire(false);
+  SubCreateRef *const ref= (SubCreateRef *)signal->getDataPtr();
+  Uint32 error= ref->errorCode;
+  if (error != 1415)
+  {
+    /*
+     * This will happen if an api node connects during while other node
+     * is restarting, and in this case the subscription will already
+     * have been created.
+     * ToDo: more complete handling of api nodes joining during
+     * node restart
+     */
+    Uint32 senderRef = signal->getSendersBlockRef();
+    BlockReference cntrRef = calcNdbCntrBlockRef(refToNode(senderRef));
+    // for some reason we did not manage to create a subscription
+    // on the starting node
+    SystemError * const sysErr = (SystemError*)&signal->theData[0];
+    sysErr->errorCode = SystemError::CopySubscriptionRef;
+    sysErr->errorRef = reference();
+    sysErr->data1 = error;
+    sysErr->data2 = 0;
+    sendSignal(cntrRef, GSN_SYSTEM_ERROR, signal,
+               SystemError::SignalLength, JBB);
+    Restart.resetRestart(signal);
+    DBUG_VOID_RETURN;
+  }
+  // SubCreateConf has same signaldata as SubCreateRef
+  Restart.runSUB_CREATE_CONF(signal);
   DBUG_VOID_RETURN;
 }
 
@@ -3787,7 +3814,22 @@
   jamEntry();
   DBUG_ENTER("Suma::execSUB_START_REF");
   ndbassert(signal->getNoOfSections() == 0);
-  ndbrequire(false);
+  SubStartRef *const ref= (SubStartRef *)signal->getDataPtr();
+  Uint32 error= ref->errorCode;
+  {
+    Uint32 senderRef = signal->getSendersBlockRef();
+    BlockReference cntrRef = calcNdbCntrBlockRef(refToNode(senderRef));
+    // for some reason we did not manage to start a subscriber
+    // on the starting node
+    SystemError * const sysErr = (SystemError*)&signal->theData[0];
+    sysErr->errorCode = SystemError::CopySubscriberRef;
+    sysErr->errorRef = reference();
+    sysErr->data1 = error;
+    sysErr->data2 = 0;
+    sendSignal(cntrRef, GSN_SYSTEM_ERROR, signal,
+               SystemError::SignalLength, JBB);
+    Restart.resetRestart(signal);
+  }
   DBUG_VOID_RETURN;
 }
 
@@ -4082,6 +4124,15 @@
   //SumaStartMeConf *conf= (SumaStartMeConf*)signal->getDataPtrSend();
   suma.sendSignal(sumaRef, GSN_SUMA_START_ME_CONF, signal,
 		  SumaStartMeConf::SignalLength, JBB);
+  resetRestart(signal);
+  DBUG_VOID_RETURN;
+}
+
+void
+Suma::Restart::resetRestart(Signal* signal)
+{
+  jam();
+  DBUG_ENTER("Suma::Restart::resetRestart");
   nodeId = 0;
   DBUG_VOID_RETURN;
 }
Thread
bk commit into 5.1 tree (tomas:1.2083)tomas20 Jan