From: Date: November 23 2006 2:39pm Subject: bk commit into 5.1 tree (jonas:1.2072) BUG#24543 List-Archive: http://lists.mysql.com/commits/15759 X-Bug: 24543 Message-Id: <20061123133914.E9EDD620D66@perch.ndb.mysql.com> 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, 2006-11-23 14:39:11+01:00, jonas@stripped +5 -0 ndb - bug#24543 Resend if master dies during alloc node id recommit in 5.1-wl2325 storage/ndb/src/kernel/blocks/ERROR_codes.txt@stripped, 2006-11-23 14:39:09+01:00, jonas@stripped +3 -0 Add new error code storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp@stripped, 2006-11-23 14:39:09+01:00, jonas@stripped +5 -0 Add new error code storage/ndb/src/mgmsrv/MgmtSrvr.cpp@stripped, 2006-11-23 14:39:09+01:00, jonas@stripped +3 -0 Make sure to resend in case of master failure storage/ndb/test/ndbapi/testNodeRestart.cpp@stripped, 2006-11-23 14:39:10+01:00, jonas@stripped +35 -0 new testcase storage/ndb/test/run-test/daily-basic-tests.txt@stripped, 2006-11-23 14:39:10+01:00, jonas@stripped +4 -0 new 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.36/storage/ndb/test/run-test/daily-basic-tests.txt 2006-11-23 14:39:14 +01:00 +++ 1.37/storage/ndb/test/run-test/daily-basic-tests.txt 2006-11-23 14:39:14 +01:00 @@ -441,6 +441,10 @@ cmd: testNodeRestart args: -n Bug20185 T1 +max-time: 300 +cmd: testNodeRestart +args: -n Bug24543 T1 + # OLD FLEX max-time: 500 cmd: flexBench --- 1.16/storage/ndb/src/kernel/blocks/ERROR_codes.txt 2006-11-23 14:39:14 +01:00 +++ 1.17/storage/ndb/src/kernel/blocks/ERROR_codes.txt 2006-11-23 14:39:14 +01:00 @@ -21,6 +21,9 @@ 910: Crash new president after node crash +934 : Crash president in ALLOC_NODE_ID_REQ + + ERROR CODES FOR TESTING NODE FAILURE, GLOBAL CHECKPOINT HANDLING: ----------------------------------------------------------------- --- 1.30/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp 2006-11-23 14:39:14 +01:00 +++ 1.31/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp 2006-11-23 14:39:14 +01:00 @@ -4799,6 +4799,11 @@ return; } + if (ERROR_INSERTED(934) && nodeId != getOwnNodeId()) + { + CRASH_INSERTION(934); + } + opAllocNodeIdReq.m_req = *req; opAllocNodeIdReq.m_error = 0; opAllocNodeIdReq.m_connectCount = getNodeInfo(refToNode(senderRef)).m_connectCount; --- 1.95/storage/ndb/src/mgmsrv/MgmtSrvr.cpp 2006-11-23 14:39:14 +01:00 +++ 1.96/storage/ndb/src/mgmsrv/MgmtSrvr.cpp 2006-11-23 14:39:14 +01:00 @@ -1883,7 +1883,10 @@ ndbout_c("Node %d fail completed", rep->failedNodeId); #endif if (rep->failedNodeId == nodeId) + { + do_send = 1; nodeId = 0; + } continue; } case GSN_NODE_FAILREP:{ --- 1.24/storage/ndb/test/ndbapi/testNodeRestart.cpp 2006-11-23 14:39:14 +01:00 +++ 1.25/storage/ndb/test/ndbapi/testNodeRestart.cpp 2006-11-23 14:39:14 +01:00 @@ -918,6 +918,37 @@ return NDBT_OK; } +int +runBug24543(NDBT_Context* ctx, NDBT_Step* step){ + NdbRestarter restarter; + + int val2[] = { DumpStateOrd::CmvmiSetRestartOnErrorInsert, 1 }; + if (restarter.dumpStateAllNodes(val2, 2)) + return NDBT_FAILED; + + int nodes[2]; + nodes[0] = restarter.getMasterNodeId(); + restarter.insertErrorInNode(nodes[0], 934); + + nodes[1] = restarter.getRandomNodeOtherNodeGroup(nodes[0], rand()); + if (nodes[1] == -1) + { + nodes[1] = restarter.getRandomNodeSameNodeGroup(nodes[0], rand()); + } + + restarter.restartOneDbNode(nodes[1], false, true, true); + if (restarter.waitNodesNoStart(nodes, 2)) + return NDBT_FAILED; + + restarter.startNodes(nodes, 2); + if (restarter.waitNodesStarted(nodes, 2)) + { + return NDBT_FAILED; + } + + return NDBT_OK; +} + NDBT_TESTSUITE(testNodeRestart); TESTCASE("NoLoad", @@ -1230,6 +1261,10 @@ INITIALIZER(runLoadTable); STEP(runBug20185); FINALIZER(runClearTable); +} +TESTCASE("Bug24543", "") +{ + INITIALIZER(runBug24543); } NDBT_TESTSUITE_END(testNodeRestart);