void DbtuxProxy::sendINDEX_STAT_REP(Signal* signal, Uint32 ssId, SectionHandle*) { Ss_INDEX_STAT_REP& ss = ssFind<Ss_INDEX_STAT_REP>(ssId); IndexStatRep* rep = (IndexStatRep*)signal->getDataPtrSend(); *rep = ss.m_rep; rep->senderData = reference(); rep->senderData = ssId; const Uint32 instance = workerInstance(ss.m_worker); NdbLogPartInfo lpinfo(instance); ndbrequire(rep->fragId != ZNIL); if (!lpinfo.partNoOwner(rep->indexId, rep->fragId)) { jam(); skipReq(ss); return; } sendSignal(workerRef(ss.m_worker), GSN_INDEX_STAT_REP, signal, IndexStatRep::SignalLength, JBB); }
void Dblqh::initData() { #ifdef ERROR_INSERT c_master_node_id = RNIL; #endif caddfragrecFileSize = ZADDFRAGREC_FILE_SIZE; cgcprecFileSize = ZGCPREC_FILE_SIZE; chostFileSize = MAX_NDB_NODES; clcpFileSize = ZNO_CONCURRENT_LCP; clfoFileSize = 0; clogFileFileSize = 0; NdbLogPartInfo lpinfo(instance()); clogPartFileSize = lpinfo.partCount; cpageRefFileSize = ZPAGE_REF_FILE_SIZE; cscanrecFileSize = 0; ctabrecFileSize = 0; ctcConnectrecFileSize = 0; ctcNodeFailrecFileSize = MAX_NDB_NODES; cTransactionDeadlockDetectionTimeout = 100; addFragRecord = 0; gcpRecord = 0; hostRecord = 0; lcpRecord = 0; logPartRecord = 0; logFileRecord = 0; logFileOperationRecord = 0; logPageRecord = 0; pageRefRecord = 0; tablerec = 0; tcConnectionrec = 0; tcNodeFailRecord = 0; // Records with constant sizes cLqhTimeOutCount = 0; cLqhTimeOutCheckCount = 0; cbookedAccOps = 0; cpackedListIndex = 0; m_backup_ptr = RNIL; clogFileSize = 16; cmaxLogFilesInPageZero = 40; cmaxValidLogFilesInPageZero = cmaxLogFilesInPageZero - 1; #if defined VM_TRACE || defined ERROR_INSERT cmaxLogFilesInPageZero_DUMP = 0; #endif totalLogFiles = 0; logFileInitDone = 0; totallogMBytes = 0; logMBytesInitDone = 0; m_startup_report_frequency = 0; c_active_add_frag_ptr_i = RNIL; for (Uint32 i = 0; i < 1024; i++) { ctransidHash[i] = RNIL; }//for c_last_force_lcp_time = 0; c_free_mb_force_lcp_limit = 16; c_free_mb_tail_problem_limit = 4; cTotalLqhKeyReqCount = 0; c_max_redo_lag = 30; // seconds c_max_redo_lag_counter = 3; // 3 strikes and you're out c_max_parallel_scans_per_frag = 32; c_lcpFragWatchdog.block = this; c_lcpFragWatchdog.reset(); c_lcpFragWatchdog.thread_active = false; c_keyOverloads = 0; c_keyOverloadsTcNode = 0; c_keyOverloadsReaderApi = 0; c_keyOverloadsPeerNode = 0; c_keyOverloadsSubscriber = 0; c_scanSlowDowns = 0; c_fragmentsStarted = 0; c_fragmentsStartedWithCopy = 0; c_fragCopyTable = 0; c_fragCopyFrag = 0; c_fragCopyRowsIns = 0; c_fragCopyRowsDel = 0; c_fragBytesCopied = 0; c_fragmentCopyStart = 0; c_fragmentsCopied = 0; c_totalCopyRowsIns = 0; c_totalCopyRowsDel = 0; c_totalBytesCopied = 0; }//Dblqh::initData()
void DbtuxProxy::sendINDEX_STAT_IMPL_REQ(Signal* signal, Uint32 ssId, SectionHandle*) { Ss_INDEX_STAT_IMPL_REQ& ss = ssFind<Ss_INDEX_STAT_IMPL_REQ>(ssId); IndexStatImplReq* req = (IndexStatImplReq*)signal->getDataPtrSend(); *req = ss.m_req; req->senderRef = reference(); req->senderData = ssId; const Uint32 instance = workerInstance(ss.m_worker); NdbLogPartInfo lpinfo(instance); //XXX remove unused switch (req->requestType) { case IndexStatReq::RT_START_MON: /* * DICT sets fragId if assigned frag is on this node, or else ZNIL * to turn off any possible old assignment. In MT-LQH we also have * to check which worker owns the frag. */ if (req->fragId != ZNIL && !lpinfo.partNoOwner(req->indexId, req->fragId)) { jam(); req->fragId = ZNIL; } break; case IndexStatReq::RT_STOP_MON: /* * DICT sets fragId to ZNIL always. There is no (pointless) check * to see if the frag was ever assigned. */ ndbrequire(req->fragId == ZNIL); break; case IndexStatReq::RT_SCAN_FRAG: ndbrequire(req->fragId != ZNIL); if (!lpinfo.partNoOwner(req->indexId, req->fragId)) { jam(); skipReq(ss); return; } break; case IndexStatReq::RT_CLEAN_NEW: case IndexStatReq::RT_CLEAN_OLD: case IndexStatReq::RT_CLEAN_ALL: ndbrequire(req->fragId == ZNIL); break; case IndexStatReq::RT_DROP_HEAD: /* * Only one client can do the PK-delete of the head record. We use * of course the worker which owns the assigned fragment. */ ndbrequire(req->fragId != ZNIL); if (!lpinfo.partNoOwner(req->indexId, req->fragId)) { jam(); skipReq(ss); return; } break; default: ndbrequire(false); break; } sendSignal(workerRef(ss.m_worker), GSN_INDEX_STAT_IMPL_REQ, signal, IndexStatImplReq::SignalLength, JBB); }