From: Date: July 2 2007 1:45pm Subject: bk commit into 5.0 tree (jonas:1.2312) BUG#29364 List-Archive: http://lists.mysql.com/commits/30063 X-Bug: 29364 Message-Id: <20070702114528.478A1718847@perch.ndb.mysql.com> Below is the list of changes that have just been committed into a local 5.0 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 13:45:24+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) ndb/src/kernel/blocks/dbtc/DbtcMain.cpp@stripped, 2007-07-02 13:45:15+02:00, jonas@stripped +7 -0 on node restart, make sure to init all already started nodes to NF_STARTED ndb/test/ndbapi/testNodeRestart.cpp@stripped, 2007-07-02 13:45:15+02:00, jonas@stripped +58 -5 test prg ndb/test/run-test/daily-basic-tests.txt@stripped, 2007-07-02 13:45:15+02:00, jonas@stripped +4 -0 test prg # 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/50-work --- 1.53/ndb/test/run-test/daily-basic-tests.txt 2007-07-02 13:45:28 +02:00 +++ 1.54/ndb/test/run-test/daily-basic-tests.txt 2007-07-02 13:45:28 +02:00 @@ -479,6 +479,10 @@ max-time: 1000 cmd: testNodeRestart +args: -n Bug29364 T1 + +max-time: 1000 +cmd: testNodeRestart args: -n Bug25364 T1 max-time: 1000 --- 1.103/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp 2007-07-02 13:45:28 +02:00 +++ 1.104/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp 2007-07-02 13:45:28 +02:00 @@ -882,6 +882,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); @@ -10108,6 +10114,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.31/ndb/test/ndbapi/testNodeRestart.cpp 2007-07-02 13:45:28 +02:00 +++ 1.32/ndb/test/ndbapi/testNodeRestart.cpp 2007-07-02 13:45:28 +02:00 @@ -944,12 +944,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; @@ -1552,6 +1602,9 @@ } TESTCASE("Bug27283", ""){ INITIALIZER(runBug27283); +} +TESTCASE("Bug29364", ""){ + INITIALIZER(runBug29364); } NDBT_TESTSUITE_END(testNodeRestart);