List:Commits« Previous MessageNext Message »
From:jonas Date:July 2 2007 3:22pm
Subject:bk commit into 5.1 tree (jonas:1.2157) BUG#29364
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-07-02 15:22:46+02:00, jonas@stripped +3 -0
  ndb - bug#29364 - "SQL queries hang while data node in start phase 5"
    In TC init node status for already started nodes during node restart
    (not present in 5.1)

  storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp@stripped, 2007-07-02 15:22:43+02:00,
jonas@stripped +7 -0
    ndb - bug#29364 - "SQL queries hang while data node in start phase 5"
      In TC init node status for already started nodes during node restart
      (not present in 5.1)

  storage/ndb/test/ndbapi/testNodeRestart.cpp@stripped, 2007-07-02 15:22:43+02:00,
jonas@stripped +58 -5
    testcase

  storage/ndb/test/run-test/daily-basic-tests.txt@stripped, 2007-07-02 15:22:43+02: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/drop5

--- 1.56/storage/ndb/test/run-test/daily-basic-tests.txt	2007-07-02 15:22:49 +02:00
+++ 1.57/storage/ndb/test/run-test/daily-basic-tests.txt	2007-07-02 15:22:49 +02:00
@@ -463,6 +463,10 @@
 
 max-time: 1000
 cmd: testNodeRestart
+args: -n Bug29364 T1
+
+max-time: 1000
+cmd: testNodeRestart
 args: -n Bug25364 T1
 
 max-time: 1000

--- 1.106/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2007-07-02 15:22:49 +02:00
+++ 1.107/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2007-07-02 15:22:49 +02:00
@@ -895,6 +895,12 @@
         hostptr.p->hostStatus = HS_ALIVE;
 	c_alive_nodes.set(i);
       }//if
+
+      if (NodeBitmask::get(readNodes->startedNodes, i))
+      {
+        jam();
+        hostptr.p->m_nf_bits = HostRecord::NF_STARTED;
+      }
     }//if
   }//for
   ndbsttorry010Lab(signal);
@@ -10141,6 +10147,7 @@
     hostptr.p->noOfWordsTCINDXCONF = 0;
     hostptr.p->noOfPackedWordsLqh = 0;
     hostptr.p->hostLqhBlockRef = calcLqhBlockRef(hostptr.i);
+    hostptr.p->m_nf_bits = 0;
   }//for
   c_alive_nodes.clear();
 }//Dbtc::inithost()

--- 1.40/storage/ndb/test/ndbapi/testNodeRestart.cpp	2007-07-02 15:22:49 +02:00
+++ 1.41/storage/ndb/test/ndbapi/testNodeRestart.cpp	2007-07-02 15:22:49 +02:00
@@ -1125,12 +1125,62 @@
     
     restarter.startNodes(&nodeId, 1);
     
-    for (Uint32 i = 0; i < 100; i++)
-    {
-      hugoTrans.pkReadRecords(pNdb, 100, 1, NdbOperation::LM_CommittedRead);
-    }
-    
+    do {
+      for (Uint32 i = 0; i < 100; i++)
+      {
+        hugoTrans.pkReadRecords(pNdb, 100, 1, NdbOperation::LM_CommittedRead);
+      }
+    } while (restarter.waitClusterStarted(5) != 0);
+  }
+  
+  return NDBT_OK;
+}
+
+int 
+runBug29364(NDBT_Context* ctx, NDBT_Step* step){
+  int result = NDBT_OK;
+  int loops = ctx->getNumLoops();
+  int records = ctx->getNumRecords();
+  NdbRestarter restarter;
+  Ndb* pNdb = GETNDB(step);
+  
+  HugoTransactions hugoTrans(*ctx->getTab());
+
+  if (restarter.getNumDbNodes() < 4)
+    return NDBT_OK;
+
+  int dump0[] = { 9000, 0 } ;
+  int dump1[] = { 9001, 0 } ;
+  Uint32 ownNode = refToNode(pNdb->getReference());
+  dump0[1] = ownNode;
+
+  for (; loops; loops --)
+  {
+    int node0 = restarter.getDbNodeId(rand() % restarter.getNumDbNodes());
+    int node1 = restarter.getRandomNodeOtherNodeGroup(node0, rand());
+
+    restarter.restartOneDbNode(node0, false, true, true);
+    restarter.waitNodesNoStart(&node0, 1);
+    restarter.startNodes(&node0, 1);
     restarter.waitClusterStarted();
+
+    restarter.restartOneDbNode(node1, false, true, true);    
+    restarter.waitNodesNoStart(&node1, 1);
+    if (restarter.dumpStateOneNode(node1, dump0, 2))
+      return NDBT_FAILED;
+
+    restarter.startNodes(&node1, 1);    
+    
+    do {
+      
+      for (Uint32 i = 0; i < 100; i++)
+      {
+        hugoTrans.pkReadRecords(pNdb, 100, 1, NdbOperation::LM_CommittedRead);
+      }
+    } while (restarter.waitClusterStarted(5) != 0);
+    
+    if (restarter.dumpStateOneNode(node1, dump1, 1))
+      return NDBT_FAILED;
   }
   
   return NDBT_OK;
@@ -1888,6 +1938,9 @@
 }
 TESTCASE("Bug27283", ""){
   INITIALIZER(runBug27283);
+}
+TESTCASE("Bug29364", ""){
+  INITIALIZER(runBug29364);
 }
 TESTCASE("Bug27466", ""){
   INITIALIZER(runBug27466);
Thread
bk commit into 5.1 tree (jonas:1.2157) BUG#29364jonas2 Jul