List:Commits« Previous MessageNext Message »
From:jonas Date:January 11 2007 7:46pm
Subject:bk commit into 5.1 tree (jonas:1.2088) BUG#25554
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-01-11 20:46:18+01:00, jonas@stripped +4 -0
  ndb - bug#25554
    fix a master failure during nr bug

  storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp@stripped, 2007-01-11 20:46:16+01:00, jonas@stripped +2 -1
    1) make sure to call release takeover after init takeover, so no leak
    2) do endTakeover in handleTakeOverNewMaster, as it's done on participants
    

  storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp@stripped, 2007-01-11 20:46:16+01:00, jonas@stripped +21 -0
    Crash already on failRep or prepfailreq

  storage/ndb/test/ndbapi/testNodeRestart.cpp@stripped, 2007-01-11 20:46:16+01:00, jonas@stripped +50 -0
    testcase

  storage/ndb/test/run-test/daily-basic-tests.txt@stripped, 2007-01-11 20:46:16+01:00, jonas@stripped +4 -0
    testcase

# 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/mysql-5.1-wl2325-5.0

--- 1.41/storage/ndb/test/run-test/daily-basic-tests.txt	2007-01-11 20:46:21 +01:00
+++ 1.42/storage/ndb/test/run-test/daily-basic-tests.txt	2007-01-11 20:46:21 +01:00
@@ -461,6 +461,10 @@
 cmd: testNodeRestart
 args: -n Bug25468 T1
 
+max-time: 1000
+cmd: testNodeRestart
+args: -n Bug25554 T1
+
 # OLD FLEX
 max-time: 500
 cmd: flexBench

--- 1.54/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2007-01-11 20:46:21 +01:00
+++ 1.55/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2007-01-11 20:46:21 +01:00
@@ -3490,7 +3490,6 @@
   takeOverPtr.i = takeOverPtrI;
   ptrCheckGuard(takeOverPtr, MAX_NDB_NODES, takeOverRecord);
 
-  releaseTakeOver(takeOverPtrI);
   if ((takeOverPtr.p->toMasterStatus != TakeOverRecord::IDLE) &&
       (takeOverPtr.p->toMasterStatus != TakeOverRecord::TO_WAIT_START_TAKE_OVER)) {
     jam();
@@ -3504,6 +3503,7 @@
   }//if
   setAllowNodeStart(takeOverPtr.p->toStartingNode, true);
   initTakeOver(takeOverPtr);
+  releaseTakeOver(takeOverPtrI);
 }//Dbdih::endTakeOver()
 
 void Dbdih::releaseTakeOver(Uint32 takeOverPtrI)
@@ -4636,6 +4636,7 @@
       break;
     }
     ndbrequire(ok);
+    endTakeOver(takeOverPtr.i);
   }//if
 }//Dbdih::handleTakeOverNewMaster()
 

--- 1.34/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp	2007-01-11 20:46:21 +01:00
+++ 1.35/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp	2007-01-11 20:46:21 +01:00
@@ -2986,6 +2986,17 @@
     systemErrorLab(signal, __LINE__);
     return;
   }//if
+
+  if (getNodeState().startLevel < NodeState::SL_STARTED)
+  {
+    jam();
+    CRASH_INSERTION(932);
+    char buf[100];
+    BaseString::snprintf(buf, 100, "Node failure during restart");
+    progError(__LINE__, NDBD_EXIT_SR_OTHERNODEFAILED, buf);
+    ndbrequire(false);
+  }
+
   TnoFailedNodes = cnoFailedNodes;
   failReport(signal, failedNodePtr.i, (UintR)ZTRUE, aFailCause);
   if (cpresident == getOwnNodeId()) {
@@ -3071,6 +3082,16 @@
     systemErrorLab(signal, __LINE__);
     return;
   }//if
+
+  if (getNodeState().startLevel < NodeState::SL_STARTED)
+  {
+    jam();
+    CRASH_INSERTION(932);
+    char buf[100];
+    BaseString::snprintf(buf, 100, "Node failure during restart");
+    progError(__LINE__, NDBD_EXIT_SR_OTHERNODEFAILED, buf);
+    ndbrequire(false);
+  }
 
   guard0 = cnoPrepFailedNodes - 1;
   arrGuard(guard0, MAX_NDB_NODES);

--- 1.28/storage/ndb/test/ndbapi/testNodeRestart.cpp	2007-01-11 20:46:21 +01:00
+++ 1.29/storage/ndb/test/ndbapi/testNodeRestart.cpp	2007-01-11 20:46:21 +01:00
@@ -1082,6 +1082,53 @@
   return NDBT_OK;
 }
 
+int runBug25554(NDBT_Context* ctx, NDBT_Step* step){
+  
+  int result = NDBT_OK;
+  int loops = ctx->getNumLoops();
+  int records = ctx->getNumRecords();
+  NdbRestarter restarter;
+  
+  for (int i = 0; i<loops; i++)
+  {
+    int master = restarter.getMasterNodeId();
+    int node1 = restarter.getRandomNodeOtherNodeGroup(master, rand());
+    restarter.restartOneDbNode(node1, false, true, true);
+
+    int val2[] = { DumpStateOrd::CmvmiSetRestartOnErrorInsert, 1 };
+  
+    if (restarter.dumpStateOneNode(master, val2, 2))
+      return NDBT_FAILED;
+
+    if (restarter.insertErrorInNode(master, 7141))
+      return NDBT_FAILED;
+
+    if (restarter.waitNodesNoStart(&node1, 1))
+      return NDBT_FAILED;
+
+    if (restarter.dumpStateOneNode(node1, val2, 2))
+      return NDBT_FAILED;
+
+    if (restarter.insertErrorInNode(node1, 932))
+      return NDBT_FAILED;
+
+    if (restarter.startNodes(&node1, 1))
+      return NDBT_FAILED;
+
+    int nodes[] = { master, node1 };
+    if (restarter.waitNodesNoStart(nodes, 2))
+      return NDBT_FAILED;
+
+    if (restarter.startNodes(nodes, 2))
+      return NDBT_FAILED;
+
+    if (restarter.waitClusterStarted())
+      return NDBT_FAILED;
+  }    
+
+  return NDBT_OK;
+}
+
 
 NDBT_TESTSUITE(testNodeRestart);
 TESTCASE("NoLoad", 
@@ -1407,6 +1454,9 @@
 }
 TESTCASE("Bug25468", ""){
   INITIALIZER(runBug25468);
+}
+TESTCASE("Bug25554", ""){
+  INITIALIZER(runBug25554);
 }
 NDBT_TESTSUITE_END(testNodeRestart);
 
Thread
bk commit into 5.1 tree (jonas:1.2088) BUG#25554jonas11 Jan