void Ndbfs::execCONTINUEB(Signal* signal) { jamEntry(); if (signal->theData[0] == NdbfsContinueB::ZSCAN_MEMORYCHANNEL_10MS_DELAY) { jam(); // Also send CONTINUEB to ourself in order to scan for // incoming answers from AsyncFile on MemoryChannel theFromThreads signal->theData[0] = NdbfsContinueB::ZSCAN_MEMORYCHANNEL_10MS_DELAY; sendSignalWithDelay(reference(), GSN_CONTINUEB, signal, 10, 1); if (scanningInProgress == true) { jam(); return; } } if (scanIPC(signal)) { jam(); scanningInProgress = true; signal->theData[0] = NdbfsContinueB::ZSCAN_MEMORYCHANNEL_NO_DELAY; sendSignal(reference(), GSN_CONTINUEB, signal, 1, JBB); } else { jam(); scanningInProgress = false; } return; }
/* Received a restart signal. * Answer it like any other block * PR0 : StartCase * DR0 : StartPhase * DR1 : ? * DR2 : ? * DR3 : ? * DR4 : ? * DR5 : SignalKey */ void Ndbfs::execSTTOR(Signal* signal) { jamEntry(); if(signal->theData[1] == 0){ // StartPhase 0 jam(); { #ifdef NDB_WIN32 CreateDirectory(theFileSystemPath.c_str(), 0); #else mkdir(theFileSystemPath.c_str(), S_IRUSR | S_IWUSR | S_IXUSR | S_IXGRP | S_IRGRP); #endif } cownref = NDBFS_REF; // close all open files ndbrequire(theOpenFiles.size() == 0); scanningInProgress = false; signal->theData[0] = NdbfsContinueB::ZSCAN_MEMORYCHANNEL_10MS_DELAY; sendSignalWithDelay(cownref, GSN_CONTINUEB, signal, 10, 1); signal->theData[3] = 255; sendSignal(NDBCNTR_REF, GSN_STTORRY, signal,4, JBB); return; } ndbrequire(0); }
void Thrman::sendNextCONTINUEB(Signal *signal) { signal->theData[0] = ZCONTINUEB_MEASURE_CPU_USAGE; sendSignalWithDelay(reference(), GSN_CONTINUEB, signal, 1000, 1); }
void Trpman::execCONNECT_REP(Signal *signal) { const Uint32 hostId = signal->theData[0]; jamEntry(); const NodeInfo::NodeType type = (NodeInfo::NodeType)getNodeInfo(hostId).m_type; ndbrequire(type != NodeInfo::INVALID); /** * Inform QMGR that client has connected */ signal->theData[0] = hostId; if (ERROR_INSERTED(9005)) { sendSignalWithDelay(QMGR_REF, GSN_CONNECT_REP, signal, 50, 1); } else { sendSignal(QMGR_REF, GSN_CONNECT_REP, signal, 1, JBA); } /* Automatically subscribe events for MGM nodes. */ if (type == NodeInfo::MGM) { jam(); globalTransporterRegistry.setIOState(hostId, NoHalt); } //------------------------------------------ // Also report this event to the Event handler //------------------------------------------ signal->theData[0] = NDB_LE_Connected; signal->theData[1] = hostId; sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB); }
/* ---------------------------------------------------------------- */ void Dbtup::lcpSaveDataPageLab(Signal* signal, Uint32 ciIndex) { CheckpointInfoPtr ciPtr; DiskBufferSegmentInfoPtr dbsiPtr; FragrecordPtr regFragPtr; LocalLogInfoPtr lliPtr; UndoPagePtr undoCopyPagePtr; PagePtr pagePtr; ciPtr.i = ciIndex; ptrCheckGuard(ciPtr, cnoOfLcpRec, checkpointInfo); if (ERROR_INSERTED(4000)){ if (ciPtr.p->lcpTabPtr == c_errorInsert4000TableId) { // Delay writing of data pages during LCP ndbout << "Delay writing of data pages during LCP" << endl; signal->theData[0] = ZCONT_SAVE_DP; signal->theData[1] = ciIndex; sendSignalWithDelay(cownref, GSN_CONTINUEB, signal, 1000, 2); return; }//if }//if if (clblPageCounter == 0) { ljam(); signal->theData[0] = ZCONT_SAVE_DP; signal->theData[1] = ciPtr.i; sendSignalWithDelay(cownref, GSN_CONTINUEB, signal, 100, 2); return; } else { ljam(); clblPageCounter--; }//if regFragPtr.i = ciPtr.p->lcpFragmentP; ptrCheckGuard(regFragPtr, cnoOfFragrec, fragrecord); dbsiPtr.i = ciPtr.p->lcpDataBufferSegmentP; ptrCheckGuard(dbsiPtr, cnoOfConcurrentWriteOp, diskBufferSegmentInfo); pagePtr.i = getRealpid(regFragPtr.p, regFragPtr.p->minPageNotWrittenInCheckpoint); ptrCheckGuard(pagePtr, cnoOfPage, page); ndbrequire(dbsiPtr.p->pdxNumDataPages < 16); undoCopyPagePtr.i = dbsiPtr.p->pdxDataPage[dbsiPtr.p->pdxNumDataPages]; ptrCheckGuard(undoCopyPagePtr, cnoOfUndoPage, undoPage); MEMCOPY_NO_WORDS(&undoCopyPagePtr.p->undoPageWord[0], &pagePtr.p->pageWord[0], ZWORDS_ON_PAGE); regFragPtr.p->minPageNotWrittenInCheckpoint++; dbsiPtr.p->pdxNumDataPages++; if (regFragPtr.p->minPageNotWrittenInCheckpoint == regFragPtr.p->maxPageWrittenInCheckpoint) { /* ---------------------------------------------------------- */ /* ALL PAGES ARE COPIED, TIME TO FINISH THE CHECKPOINT */ /* SAVE THE END POSITIONS OF THE LOG RECORDS SINCE ALL DATA */ /* PAGES ARE NOW SAFE ON DISK AND NO MORE LOGGING WILL APPEAR */ /* ---------------------------------------------------------- */ ljam(); lliPtr.i = ciPtr.p->lcpLocalLogInfoP; ptrCheckGuard(lliPtr, cnoOfParallellUndoFiles, localLogInfo); regFragPtr.p->checkpointVersion = RNIL; /* UNDO LOGGING IS SHUT OFF */ lcpWriteListDataPageSegment(signal, dbsiPtr, ciPtr, false); dbsiPtr.p->pdxOperation = CHECKPOINT_DATA_WRITE_LAST; } else if (dbsiPtr.p->pdxNumDataPages == ZDB_SEGMENT_SIZE) { ljam(); lcpWriteListDataPageSegment(signal, dbsiPtr, ciPtr, false); dbsiPtr.p->pdxOperation = CHECKPOINT_DATA_WRITE; } else { ljam(); signal->theData[0] = ZCONT_SAVE_DP; signal->theData[1] = ciPtr.i; sendSignal(cownref, GSN_CONTINUEB, signal, 2, JBB); }//if }//Dbtup::lcpSaveDataPageLab()