From: Date: March 21 2006 3:13pm Subject: bk commit into 4.1 tree (jonas:1.2474) BUG#18118 List-Archive: http://lists.mysql.com/commits/3993 X-Bug: 18118 Message-Id: <20060321141345.40AE930938A@perch.ndb.mysql.com> Below is the list of changes that have just been committed into a local 4.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 1.2474 06/03/21 15:13:41 jonas@stripped +2 -0 ndb - bug#18118 timeslice DUMP(7015) ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 1.34 06/03/21 15:13:39 jonas@stripped +74 -52 timeslice DUMP(7015) ndb/include/kernel/signaldata/DumpStateOrd.hpp 1.7 06/03/21 15:13:39 jonas@stripped +3 -0 doc... # 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/41-work --- 1.6/ndb/include/kernel/signaldata/DumpStateOrd.hpp 2006-03-21 14:47:08 +01:00 +++ 1.7/ndb/include/kernel/signaldata/DumpStateOrd.hpp 2006-03-21 15:13:39 +01:00 @@ -126,6 +126,9 @@ DihAllAllowNodeStart = 7016, DihMinTimeBetweenLCP = 7017, DihMaxTimeBetweenLCP = 7018, + // 7019 + // 7020 + // 7021 EnableUndoDelayDataWrite = 7080, // DIH+ACC+TUP DihSetTimeBetweenGcp = 7090, DihStartLcpImmediately = 7099, --- 1.33/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2006-03-21 14:47:08 +01:00 +++ 1.34/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2006-03-21 15:13:39 +01:00 @@ -5983,6 +5983,7 @@ execDUMP_STATE_ORD(signal); signal->theData[0] = 7015; + signal->theData[1] = 0; execDUMP_STATE_ORD(signal); c_lcpMasterTakeOverState.set(LMTOS_IDLE, __LINE__); @@ -13036,7 +13037,8 @@ Dbdih::execDUMP_STATE_ORD(Signal* signal) { DumpStateOrd * const & dumpState = (DumpStateOrd *)&signal->theData[0]; - if (dumpState->args[0] == DumpStateOrd::DihDumpNodeRestartInfo) { + Uint32 arg = dumpState->args[0]; + if (arg == DumpStateOrd::DihDumpNodeRestartInfo) { infoEvent("c_nodeStartMaster.blockLcp = %d, c_nodeStartMaster.blockGcp = %d, c_nodeStartMaster.wait = %d", c_nodeStartMaster.blockLcp, c_nodeStartMaster.blockGcp, c_nodeStartMaster.wait); infoEvent("cstartGcpNow = %d, cgcpStatus = %d", @@ -13046,7 +13048,7 @@ infoEvent("cgcpOrderBlocked = %d, cgcpStartCounter = %d", cgcpOrderBlocked, cgcpStartCounter); }//if - if (dumpState->args[0] == DumpStateOrd::DihDumpNodeStatusInfo) { + if (arg == DumpStateOrd::DihDumpNodeStatusInfo) { NodeRecordPtr localNodePtr; infoEvent("Printing nodeStatus of all nodes"); for (localNodePtr.i = 1; localNodePtr.i < MAX_NDB_NODES; localNodePtr.i++) { @@ -13058,7 +13060,7 @@ }//for }//if - if (dumpState->args[0] == DumpStateOrd::DihPrintFragmentation){ + if (arg == DumpStateOrd::DihPrintFragmentation){ infoEvent("Printing fragmentation of all tables --"); for(Uint32 i = 0; iargs[0] == 7019 && signal->getLength() == 2) + if(arg == 7019 && signal->getLength() == 2) { char buf2[8+1]; NodeRecordPtr nodePtr; @@ -13251,7 +13253,7 @@ nodePtr.p->m_nodefailSteps.getText(buf2)); } - if(dumpState->args[0] == 7020 && signal->getLength() > 3) + if(arg == 7020 && signal->getLength() > 3) { Uint32 gsn= signal->theData[1]; Uint32 block= signal->theData[2]; @@ -13275,7 +13277,7 @@ gsn, getBlockName(block, "UNKNOWN"), length, buf); } - if(dumpState->args[0] == DumpStateOrd::DihDumpLCPState){ + if(arg == DumpStateOrd::DihDumpLCPState){ infoEvent("-- Node %d LCP STATE --", getOwnNodeId()); infoEvent("lcpStatus = %d (update place = %d) ", c_lcpState.lcpStatus, c_lcpState.lcpStatusUpdatedPlace); @@ -13291,7 +13293,7 @@ infoEvent("-- Node %d LCP STATE --", getOwnNodeId()); } - if(dumpState->args[0] == DumpStateOrd::DihDumpLCPMasterTakeOver){ + if(arg == DumpStateOrd::DihDumpLCPMasterTakeOver){ infoEvent("-- Node %d LCP MASTER TAKE OVER STATE --", getOwnNodeId()); infoEvent ("c_lcpMasterTakeOverState.state = %d updatePlace = %d failedNodeId = %d", @@ -13306,52 +13308,25 @@ infoEvent("-- Node %d LCP MASTER TAKE OVER STATE --", getOwnNodeId()); } - if (signal->theData[0] == 7015){ - for(Uint32 i = 0; itabStatus != TabRecord::TS_ACTIVE) - continue; - - infoEvent - ("Table %d: TabCopyStatus: %d TabUpdateStatus: %d TabLcpStatus: %d", - tabPtr.i, - tabPtr.p->tabCopyStatus, - tabPtr.p->tabUpdateState, - tabPtr.p->tabLcpStatus); + if (signal->theData[0] == 7015) + { + if (signal->getLength() == 1) + { + signal->theData[1] = 0; + } - FragmentstorePtr fragPtr; - for (Uint32 fid = 0; fid < tabPtr.p->totalfragments; fid++) { - jam(); - getFragstore(tabPtr.p, fid, fragPtr); - - char buf[100], buf2[100]; - BaseString::snprintf(buf, sizeof(buf), " Fragment %d: noLcpReplicas==%d ", - fid, fragPtr.p->noLcpReplicas); - - Uint32 num=0; - ReplicaRecordPtr replicaPtr; - replicaPtr.i = fragPtr.p->storedReplicas; - do { - ptrCheckGuard(replicaPtr, creplicaFileSize, replicaRecord); - BaseString::snprintf(buf2, sizeof(buf2), "%s %d(on %d)=%d(%s)", - buf, num, - replicaPtr.p->procNode, - replicaPtr.p->lcpIdStarted, - replicaPtr.p->lcpOngoingFlag ? "Ongoing" : "Idle"); - BaseString::snprintf(buf, sizeof(buf), "%s", buf2); - - num++; - replicaPtr.i = replicaPtr.p->nextReplica; - } while (replicaPtr.i != RNIL); - infoEvent(buf); - } + Uint32 tableId = signal->theData[1]; + if (tableId < ctabFileSize) + { + signal->theData[0] = 7021; + execDUMP_STATE_ORD(signal); + signal->theData[0] = 7015; + signal->theData[1] = tableId + 1; + sendSignal(reference(), GSN_DUMP_STATE_ORD, signal, 2, JBB); } } - if(dumpState->args[0] == DumpStateOrd::EnableUndoDelayDataWrite){ + if(arg == DumpStateOrd::EnableUndoDelayDataWrite){ ndbout << "Dbdih:: delay write of datapages for table = " << dumpState->args[1]<< endl; // Send this dump to ACC and TUP @@ -13381,7 +13356,7 @@ return; } - if(dumpState->args[0] == 7098){ + if(arg == 7098){ if(signal->length() == 3){ jam(); infoEvent("startLcpRoundLoopLab(tabel=%d, fragment=%d)", @@ -13394,12 +13369,12 @@ } } - if(dumpState->args[0] == DumpStateOrd::DihStartLcpImmediately){ + if(arg == DumpStateOrd::DihStartLcpImmediately){ c_lcpState.ctimer += (1 << c_lcpState.clcpDelay); return; } - if (dumpState->args[0] == DumpStateOrd::DihSetTimeBetweenGcp) + if (arg == DumpStateOrd::DihSetTimeBetweenGcp) { if (signal->getLength() == 1) { @@ -13413,6 +13388,53 @@ cgcpDelay = signal->theData[1]; } ndbout_c("Setting time between gcp : %d", cgcpDelay); + } + + if (arg == 7021 && signal->getLength() == 2) + { + TabRecordPtr tabPtr; + tabPtr.i = signal->theData[1]; + if (tabPtr.i >= ctabFileSize) + return; + + ptrCheckGuard(tabPtr, ctabFileSize, tabRecord); + + if(tabPtr.p->tabStatus != TabRecord::TS_ACTIVE) + return; + + infoEvent + ("Table %d: TabCopyStatus: %d TabUpdateStatus: %d TabLcpStatus: %d", + tabPtr.i, + tabPtr.p->tabCopyStatus, + tabPtr.p->tabUpdateState, + tabPtr.p->tabLcpStatus); + + FragmentstorePtr fragPtr; + for (Uint32 fid = 0; fid < tabPtr.p->totalfragments; fid++) { + jam(); + getFragstore(tabPtr.p, fid, fragPtr); + + char buf[100], buf2[100]; + BaseString::snprintf(buf, sizeof(buf), " Fragment %d: noLcpReplicas==%d ", + fid, fragPtr.p->noLcpReplicas); + + Uint32 num=0; + ReplicaRecordPtr replicaPtr; + replicaPtr.i = fragPtr.p->storedReplicas; + do { + ptrCheckGuard(replicaPtr, creplicaFileSize, replicaRecord); + BaseString::snprintf(buf2, sizeof(buf2), "%s %d(on %d)=%d(%s)", + buf, num, + replicaPtr.p->procNode, + replicaPtr.p->lcpIdStarted, + replicaPtr.p->lcpOngoingFlag ? "Ongoing" : "Idle"); + BaseString::snprintf(buf, sizeof(buf), "%s", buf2); + + num++; + replicaPtr.i = replicaPtr.p->nextReplica; + } while (replicaPtr.i != RNIL); + infoEvent(buf); + } } }//Dbdih::execDUMP_STATE_ORD()