From: Date: March 20 2007 4:16pm Subject: bk commit into 5.0 tree (jonas:1.2298) BUG#27283 List-Archive: http://lists.mysql.com/commits/22367 X-Bug: 27283 Message-Id: <20070320151629.542C383677@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-03-20 16:16:25+01:00, jonas@stripped +4 -0 ndb - bug#27283 (wl2325-5.0) Handle race condtition between MASTER_GCPCONF and execGCP_NODEFINISH ndb/src/kernel/blocks/ERROR_codes.txt@stripped, 2007-03-20 16:16:24+01:00, jonas@stripped +1 -1 new error codes ndb/src/kernel/blocks/dbdih/DbdihMain.cpp@stripped, 2007-03-20 16:16:24+01:00, jonas@stripped +29 -3 Handle race condtition between MASTER_GCPCONF and execGCP_NODEFINISH ndb/test/ndbapi/testNodeRestart.cpp@stripped, 2007-03-20 16:16:24+01:00, jonas@stripped +45 -0 testcase ndb/test/run-test/daily-basic-tests.txt@stripped, 2007-03-20 16:16:24+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/50-work --- 1.50/ndb/test/run-test/daily-basic-tests.txt 2007-03-20 16:16:29 +01:00 +++ 1.51/ndb/test/run-test/daily-basic-tests.txt 2007-03-20 16:16:29 +01:00 @@ -429,6 +429,10 @@ cmd: testNodeRestart args: -n Bug27003 T1 +max-time: 1000 +cmd: testNodeRestart +args: -n Bug27283 T1 + max-time: 500 cmd: testNodeRestart args: -n Bug15587 T1 --- 1.27/ndb/src/kernel/blocks/ERROR_codes.txt 2007-03-20 16:16:29 +01:00 +++ 1.28/ndb/src/kernel/blocks/ERROR_codes.txt 2007-03-20 16:16:29 +01:00 @@ -5,7 +5,7 @@ Next DBTUP 4014 Next DBLQH 5043 Next DBDICT 6007 -Next DBDIH 7181 +Next DBDIH 7183 Next DBTC 8039 Next CMVMI 9000 Next BACKUP 10022 --- 1.68/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2007-03-20 16:16:29 +01:00 +++ 1.69/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2007-03-20 16:16:29 +01:00 @@ -4811,6 +4811,15 @@ } else { ndbrequire(failedNodePtr.p->nodeStatus == NodeRecord::DYING); }//if + + if (ERROR_INSERTED(7181)) + { + ndbout_c("execGCP_TCFINISHED in MASTER_GCPREQ"); + CLEAR_ERROR_INSERT_VALUE; + signal->theData[1] = coldgcp; + execGCP_TCFINISHED(signal); + } + MasterGCPConf::State gcpState; switch (cgcpParticipantState) { case GCP_PARTICIPANT_READY: @@ -4877,6 +4886,14 @@ masterGCPConf->lcpActive[i] = SYSFILE->lcpActive[i]; sendSignal(newMasterBlockref, GSN_MASTER_GCPCONF, signal, MasterGCPConf::SignalLength, JBB); + + if (ERROR_INSERTED(7182)) + { + ndbout_c("execGCP_TCFINISHED in MASTER_GCPREQ"); + CLEAR_ERROR_INSERT_VALUE; + signal->theData[1] = coldgcp; + execGCP_TCFINISHED(signal); + } }//Dbdih::execMASTER_GCPREQ() void Dbdih::execMASTER_GCPCONF(Signal* signal) @@ -7542,10 +7559,10 @@ } else if (cmasterState == MASTER_TAKE_OVER_GCP) { jam(); //------------------------------------------------------------- - // We are currently taking over as master. We will delay the - // signal until we have completed the take over gcp handling. + // We are currently taking over as master. Ignore + // signal in this case since we will discover it in reception of + // MASTER_GCPCONF. //------------------------------------------------------------- - sendSignalWithDelay(reference(), GSN_GCP_NODEFINISH, signal, 20, 3); return; } else { ndbrequire(cmasterState == MASTER_ACTIVE); @@ -7691,6 +7708,15 @@ CRASH_INSERTION(7007); Uint32 gci = signal->theData[1]; ndbrequire(gci == coldgcp); + + if (ERROR_INSERTED(7181) || ERROR_INSERTED(7182)) + { + ndbout_c("killing %d", refToNode(cmasterdihref)); + signal->theData[0] = 9999; + sendSignal(numberToRef(CMVMI, refToNode(cmasterdihref)), + GSN_NDB_TAMPER, signal, 1, JBB); + return; + } cgcpParticipantState = GCP_PARTICIPANT_TC_FINISHED; signal->theData[0] = cownNodeId; --- 1.29/ndb/test/ndbapi/testNodeRestart.cpp 2007-03-20 16:16:29 +01:00 +++ 1.30/ndb/test/ndbapi/testNodeRestart.cpp 2007-03-20 16:16:29 +01:00 @@ -1178,6 +1178,48 @@ } +int +runBug27283(NDBT_Context* ctx, NDBT_Step* step) +{ + int result = NDBT_OK; + int loops = ctx->getNumLoops(); + int records = ctx->getNumRecords(); + NdbRestarter res; + + if (res.getNumDbNodes() < 2) + { + return NDBT_OK; + } + + static const int errnos[] = { 7181, 7182, 0 }; + + Uint32 pos = 0; + for (Uint32 i = 0; i