This commit is contained in:
mronstrom@mysql.com 2004-08-07 09:11:18 +02:00
commit 68979f93db
19 changed files with 78 additions and 25 deletions

View file

@ -494,7 +494,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
ConfigInfo::USED,
true,
ConfigInfo::INT,
4000,
6000,
70,
MAX_INT_RNIL },
@ -2586,7 +2586,6 @@ fixPortNumber(InitConfigFileParser::Context & ctx, const char * data){
Uint32 id1= 0, id2= 0;
require(ctx.m_currentSection->get("NodeId1", &id1));
require(ctx.m_currentSection->get("NodeId2", &id2));
id1 = id1 < id2 ? id1 : id2;
const Properties * node;
@ -2619,7 +2618,6 @@ fixPortNumber(InitConfigFileParser::Context & ctx, const char * data){
}
ctx.m_userProperties.put("ServerPortBase", base);
}
port= base + adder;
ctx.m_userProperties.put("ServerPort_", id1, port);
}

View file

@ -445,7 +445,6 @@ IPCConfig::configureTransporters(Uint32 nodeId,
if(iter.get(CFG_TCP_RECEIVE_BUFFER_SIZE, &conf.maxReceiveSize)) break;
conf.port= tmp_server_port;
const char * proxy;
if (!iter.get(CFG_TCP_PROXY, &proxy)) {
if (strlen(proxy) > 0 && nodeId2 == nodeId) {

View file

@ -93,7 +93,6 @@ bool
Transporter::connect_client() {
if(m_connected)
return true;
NDB_SOCKET_TYPE sockfd = m_socket_client->connect();
if (sockfd < 0)
@ -102,7 +101,6 @@ Transporter::connect_client() {
// send info about own id
SocketOutputStream s_output(sockfd);
s_output.println("%d", localNodeId);
// get remote id
int nodeId;
SocketInputStream s_input(sockfd);
@ -115,7 +113,6 @@ Transporter::connect_client() {
NDB_CLOSE_SOCKET(sockfd);
return false;
}
bool res = connect_client_impl(sockfd);
if(res){
m_connected = true;

View file

@ -200,8 +200,7 @@ TransporterRegistry::createTransporter(TCP_TransporterConfiguration *config) {
if(theTransporters[config->remoteNodeId] != NULL)
return false;
TCP_Transporter * t = new TCP_Transporter(*this,
config->sendBufferSize,
config->maxReceiveSize,

View file

@ -70,19 +70,21 @@ SocketClient::connect()
return -1;
}
}
const int r = ::connect(m_sockfd, (struct sockaddr*) &m_servaddr, sizeof(m_servaddr));
if (r == -1)
if (r == -1) {
NDB_CLOSE_SOCKET(m_sockfd);
m_sockfd= -1;
return -1;
}
if (m_auth)
if (m_auth) {
if (!m_auth->client_authenticate(m_sockfd))
{
NDB_CLOSE_SOCKET(m_sockfd);
m_sockfd= -1;
return -1;
}
}
NDB_SOCKET_TYPE sockfd= m_sockfd;
m_sockfd= -1;

View file

@ -147,7 +147,6 @@ SocketServer::doAccept(){
ServiceInstance & si = m_services[i];
if(FD_ISSET(si.m_socket, &readSet)){
NDB_SOCKET_TYPE childSock = accept(si.m_socket, 0, 0);
if(childSock == NDB_INVALID_SOCKET){
continue;

View file

@ -480,7 +480,6 @@ void Cmvmi::execDISCONNECT_REP(Signal *signal)
void Cmvmi::execCONNECT_REP(Signal *signal){
const Uint32 hostId = signal->theData[0];
jamEntry();
const NodeInfo::NodeType type = (NodeInfo::NodeType)getNodeInfo(hostId).m_type;

View file

@ -757,6 +757,7 @@ void Dbacc::initialiseDirRec(Signal* signal)
DirectoryarrayPtr idrDirptr;
ndbrequire(cdirarraysize > 0);
for (idrDirptr.i = 0; idrDirptr.i < cdirarraysize; idrDirptr.i++) {
refresh_watch_dog();
ptrAss(idrDirptr, directoryarray);
for (Uint32 i = 0; i <= 255; i++) {
idrDirptr.p->pagep[i] = RNIL;
@ -776,6 +777,7 @@ void Dbacc::initialiseDirRangeRec(Signal* signal)
ndbrequire(cdirrangesize > 0);
for (idrDirRangePtr.i = 0; idrDirRangePtr.i < cdirrangesize; idrDirRangePtr.i++) {
refresh_watch_dog();
ptrAss(idrDirRangePtr, dirRange);
idrDirRangePtr.p->dirArray[0] = idrDirRangePtr.i + 1;
for (Uint32 i = 1; i < 256; i++) {
@ -798,6 +800,7 @@ void Dbacc::initialiseFragRec(Signal* signal)
ndbrequire(cfragmentsize > 0);
for (regFragPtr.i = 0; regFragPtr.i < cfragmentsize; regFragPtr.i++) {
jam();
refresh_watch_dog();
ptrAss(regFragPtr, fragmentrec);
initFragGeneral(regFragPtr);
regFragPtr.p->nextfreefrag = regFragPtr.i + 1;
@ -876,6 +879,7 @@ void Dbacc::initialiseOperationRec(Signal* signal)
{
ndbrequire(coprecsize > 0);
for (operationRecPtr.i = 0; operationRecPtr.i < coprecsize; operationRecPtr.i++) {
refresh_watch_dog();
ptrAss(operationRecPtr, operationrec);
operationRecPtr.p->transactionstate = IDLE;
operationRecPtr.p->operation = ZUNDEFINED_OP;
@ -898,6 +902,7 @@ void Dbacc::initialiseOverflowRec(Signal* signal)
ndbrequire(coverflowrecsize > 0);
for (iorOverflowRecPtr.i = 0; iorOverflowRecPtr.i < coverflowrecsize; iorOverflowRecPtr.i++) {
refresh_watch_dog();
ptrAss(iorOverflowRecPtr, overflowRecord);
iorOverflowRecPtr.p->nextfreeoverrec = iorOverflowRecPtr.i + 1;
}//for
@ -958,6 +963,7 @@ void Dbacc::initialiseRootfragRec(Signal* signal)
{
ndbrequire(crootfragmentsize > 0);
for (rootfragrecptr.i = 0; rootfragrecptr.i < crootfragmentsize; rootfragrecptr.i++) {
refresh_watch_dog();
ptrAss(rootfragrecptr, rootfragmentrec);
rootfragrecptr.p->nextroot = rootfragrecptr.i + 1;
rootfragrecptr.p->fragmentptr[0] = RNIL;
@ -1013,6 +1019,7 @@ void Dbacc::initialiseTableRec(Signal* signal)
{
ndbrequire(ctablesize > 0);
for (tabptr.i = 0; tabptr.i < ctablesize; tabptr.i++) {
refresh_watch_dog();
ptrAss(tabptr, tabrec);
for (Uint32 i = 0; i < NO_OF_FRAG_PER_NODE; i++) {
tabptr.p->fragholder[i] = RNIL;

View file

@ -1313,6 +1313,7 @@ void Dbdict::initTableRecords()
TableRecordPtr tablePtr;
while (1) {
jam();
refresh_watch_dog();
c_tableRecordPool.seize(tablePtr);
if (tablePtr.i == RNIL) {
jam();
@ -1373,6 +1374,7 @@ void Dbdict::initTriggerRecords()
TriggerRecordPtr triggerPtr;
while (1) {
jam();
refresh_watch_dog();
c_triggerRecordPool.seize(triggerPtr);
if (triggerPtr.i == RNIL) {
jam();

View file

@ -6896,6 +6896,7 @@ void Dbdih::initialiseFragstore()
cfirstfragstore = RNIL;
cremainingfrags = 0;
for (i = 0; i < noOfChunks; i++) {
refresh_watch_dog();
ptrCheckGuard(fragPtr, cfragstoreFileSize, fragmentstore);
fragPtr.p->nextFragmentChunk = cfirstfragstore;
cfirstfragstore = fragPtr.i;
@ -11107,6 +11108,7 @@ void Dbdih::initialiseRecordsLab(Signal* signal,
jam();
/******** INTIALIZING API CONNECT RECORDS ********/
for (apiConnectptr.i = 0; apiConnectptr.i < capiConnectFileSize; apiConnectptr.i++) {
refresh_watch_dog();
ptrAss(apiConnectptr, apiConnectRecord);
apiConnectptr.p->nextApi = RNIL;
}//for
@ -11118,6 +11120,7 @@ void Dbdih::initialiseRecordsLab(Signal* signal,
jam();
/****** CONNECT ******/
for (connectPtr.i = 0; connectPtr.i < cconnectFileSize; connectPtr.i++) {
refresh_watch_dog();
ptrAss(connectPtr, connectRecord);
connectPtr.p->userpointer = RNIL;
connectPtr.p->userblockref = ZNIL;
@ -11182,6 +11185,7 @@ void Dbdih::initialiseRecordsLab(Signal* signal,
jam();
/******* PAGE RECORD ******/
for (pagePtr.i = 0; pagePtr.i < cpageFileSize; pagePtr.i++) {
refresh_watch_dog();
ptrAss(pagePtr, pageRecord);
pagePtr.p->nextfreepage = pagePtr.i + 1;
}//for
@ -11198,6 +11202,7 @@ void Dbdih::initialiseRecordsLab(Signal* signal,
/******* REPLICA RECORD ******/
for (initReplicaPtr.i = 0; initReplicaPtr.i < creplicaFileSize;
initReplicaPtr.i++) {
refresh_watch_dog();
ptrAss(initReplicaPtr, replicaRecord);
initReplicaPtr.p->lcpIdStarted = 0;
initReplicaPtr.p->lcpOngoingFlag = false;
@ -11217,6 +11222,7 @@ void Dbdih::initialiseRecordsLab(Signal* signal,
/********* TAB-DESCRIPTOR ********/
for (loopTabptr.i = 0; loopTabptr.i < ctabFileSize; loopTabptr.i++) {
ptrAss(loopTabptr, tabRecord);
refresh_watch_dog();
initTable(loopTabptr);
}//for
break;

View file

@ -15950,6 +15950,7 @@ void Dblqh::initialiseAttrbuf(Signal* signal)
for (attrinbufptr.i = 0;
attrinbufptr.i < cattrinbufFileSize;
attrinbufptr.i++) {
refresh_watch_dog();
ptrAss(attrinbufptr, attrbuf);
attrinbufptr.p->attrbuf[ZINBUF_NEXT] = attrinbufptr.i + 1;
}//for
@ -15972,6 +15973,7 @@ void Dblqh::initialiseDatabuf(Signal* signal)
{
if (cdatabufFileSize != 0) {
for (databufptr.i = 0; databufptr.i < cdatabufFileSize; databufptr.i++) {
refresh_watch_dog();
ptrAss(databufptr, databuf);
databufptr.p->nextDatabuf = databufptr.i + 1;
}//for
@ -15993,6 +15995,7 @@ void Dblqh::initialiseFragrec(Signal* signal)
{
if (cfragrecFileSize != 0) {
for (fragptr.i = 0; fragptr.i < cfragrecFileSize; fragptr.i++) {
refresh_watch_dog();
ptrAss(fragptr, fragrecord);
fragptr.p->fragStatus = Fragrecord::FREE;
fragptr.p->fragActiveStatus = ZFALSE;
@ -16125,6 +16128,7 @@ void Dblqh::initialiseLogPage(Signal* signal)
{
if (clogPageFileSize != 0) {
for (logPagePtr.i = 0; logPagePtr.i < clogPageFileSize; logPagePtr.i++) {
refresh_watch_dog();
ptrAss(logPagePtr, logPageRecord);
logPagePtr.p->logPageWord[ZNEXT_PAGE] = logPagePtr.i + 1;
}//for
@ -16303,6 +16307,7 @@ void Dblqh::initialiseScanrec(Signal* signal)
DLList<ScanRecord> tmp(c_scanRecordPool);
while (tmp.seize(scanptr)){
//new (scanptr.p) ScanRecord();
refresh_watch_dog();
scanptr.p->scanType = ScanRecord::ST_IDLE;
scanptr.p->scanState = ScanRecord::SCAN_FREE;
scanptr.p->scanTcWaiting = ZFALSE;
@ -16320,6 +16325,7 @@ void Dblqh::initialiseTabrec(Signal* signal)
{
if (ctabrecFileSize != 0) {
for (tabptr.i = 0; tabptr.i < ctabrecFileSize; tabptr.i++) {
refresh_watch_dog();
ptrAss(tabptr, tablerec);
tabptr.p->tableStatus = Tablerec::NOT_DEFINED;
tabptr.p->usageCount = 0;
@ -16341,6 +16347,7 @@ void Dblqh::initialiseTcrec(Signal* signal)
for (tcConnectptr.i = 0;
tcConnectptr.i < ctcConnectrecFileSize;
tcConnectptr.i++) {
refresh_watch_dog();
ptrAss(tcConnectptr, tcConnectionrec);
tcConnectptr.p->transactionState = TcConnectionrec::TC_NOT_CONNECTED;
tcConnectptr.p->tcScanRec = RNIL;

View file

@ -9581,6 +9581,7 @@ void Dbtc::initApiConnect(Signal* signal)
ndbrequire(tiacTmp > 0);
guard4 = tiacTmp + 1;
for (cachePtr.i = 0; cachePtr.i < guard4; cachePtr.i++) {
refresh_watch_dog();
ptrAss(cachePtr, cacheRecord);
cachePtr.p->firstAttrbuf = RNIL;
cachePtr.p->lastAttrbuf = RNIL;
@ -9595,6 +9596,7 @@ void Dbtc::initApiConnect(Signal* signal)
guard4 = tiacTmp - 1;
for (apiConnectptr.i = 0; apiConnectptr.i <= guard4; apiConnectptr.i++) {
refresh_watch_dog();
jam();
ptrAss(apiConnectptr, apiConnectRecord);
apiConnectptr.p->apiConnectstate = CS_DISCONNECTED;
@ -9620,6 +9622,7 @@ void Dbtc::initApiConnect(Signal* signal)
guard4 = (2 * tiacTmp) - 1;
for (apiConnectptr.i = tiacTmp; apiConnectptr.i <= guard4; apiConnectptr.i++)
{
refresh_watch_dog();
jam();
ptrCheckGuard(apiConnectptr, capiConnectFilesize, apiConnectRecord);
apiConnectptr.p->apiConnectstate = CS_RESTART;
@ -9645,6 +9648,7 @@ void Dbtc::initApiConnect(Signal* signal)
guard4 = (3 * tiacTmp) - 1;
for (apiConnectptr.i = 2 * tiacTmp; apiConnectptr.i <= guard4;
apiConnectptr.i++) {
refresh_watch_dog();
jam();
ptrCheckGuard(apiConnectptr, capiConnectFilesize, apiConnectRecord);
setApiConTimer(apiConnectptr.i, 0, __LINE__);
@ -9673,6 +9677,7 @@ void Dbtc::initattrbuf(Signal* signal)
{
ndbrequire(cattrbufFilesize > 0);
for (attrbufptr.i = 0; attrbufptr.i < cattrbufFilesize; attrbufptr.i++) {
refresh_watch_dog();
jam();
ptrAss(attrbufptr, attrbufRecord);
attrbufptr.p->attrbuf[ZINBUF_NEXT] = attrbufptr.i + 1; /* NEXT ATTRBUF */
@ -9687,6 +9692,7 @@ void Dbtc::initdatabuf(Signal* signal)
{
ndbrequire(cdatabufFilesize > 0);
for (databufptr.i = 0; databufptr.i < cdatabufFilesize; databufptr.i++) {
refresh_watch_dog();
ptrAss(databufptr, databufRecord);
databufptr.p->nextDatabuf = databufptr.i + 1;
}//for
@ -9814,6 +9820,7 @@ void Dbtc::initialiseScanrec(Signal* signal)
ScanRecordPtr scanptr;
ndbrequire(cscanrecFileSize > 0);
for (scanptr.i = 0; scanptr.i < cscanrecFileSize; scanptr.i++) {
refresh_watch_dog();
jam();
ptrAss(scanptr, scanRecord);
new (scanptr.p) ScanRecord();
@ -9840,6 +9847,7 @@ void Dbtc::initTable(Signal* signal)
ndbrequire(ctabrecFilesize > 0);
for (tabptr.i = 0; tabptr.i < ctabrecFilesize; tabptr.i++) {
refresh_watch_dog();
ptrAss(tabptr, tableRecord);
tabptr.p->currentSchemaVersion = 0;
tabptr.p->storedTable = true;
@ -9856,6 +9864,7 @@ void Dbtc::initialiseTcConnect(Signal* signal)
// Place half of tcConnectptr's in cfirstfreeTcConnectFail list
Uint32 titcTmp = ctcConnectFilesize / 2;
for (tcConnectptr.i = 0; tcConnectptr.i < titcTmp; tcConnectptr.i++) {
refresh_watch_dog();
jam();
ptrAss(tcConnectptr, tcConnectRecord);
tcConnectptr.p->tcConnectstate = OS_RESTART;
@ -9871,6 +9880,7 @@ void Dbtc::initialiseTcConnect(Signal* signal)
// Place other half in cfirstfreeTcConnect list
for (tcConnectptr.i = titcTmp; tcConnectptr.i < ctcConnectFilesize;
tcConnectptr.i++) {
refresh_watch_dog();
jam();
ptrAss(tcConnectptr, tcConnectRecord);
tcConnectptr.p->tcConnectstate = OS_RESTART;

View file

@ -888,6 +888,7 @@ void Dbtup::initializeAttrbufrec()
AttrbufrecPtr attrBufPtr;
for (attrBufPtr.i = 0;
attrBufPtr.i < cnoOfAttrbufrec; attrBufPtr.i++) {
refresh_watch_dog();
ptrAss(attrBufPtr, attrbufrec);
attrBufPtr.p->attrbuf[ZBUF_NEXT] = attrBufPtr.i + 1;
}//for
@ -944,6 +945,7 @@ void Dbtup::initializeFragrecord()
{
FragrecordPtr regFragPtr;
for (regFragPtr.i = 0; regFragPtr.i < cnoOfFragrec; regFragPtr.i++) {
refresh_watch_dog();
ptrAss(regFragPtr, fragrecord);
regFragPtr.p->nextfreefrag = regFragPtr.i + 1;
regFragPtr.p->checkpointVersion = RNIL;
@ -982,6 +984,7 @@ void Dbtup::initializeOperationrec()
{
OperationrecPtr regOpPtr;
for (regOpPtr.i = 0; regOpPtr.i < cnoOfOprec; regOpPtr.i++) {
refresh_watch_dog();
ptrAss(regOpPtr, operationrec);
regOpPtr.p->firstAttrinbufrec = RNIL;
regOpPtr.p->lastAttrinbufrec = RNIL;
@ -1036,6 +1039,7 @@ void Dbtup::initializeTablerec()
TablerecPtr regTabPtr;
for (regTabPtr.i = 0; regTabPtr.i < cnoOfTablerec; regTabPtr.i++) {
ljam();
refresh_watch_dog();
ptrAss(regTabPtr, tablerec);
initTab(regTabPtr.p);
}//for
@ -1099,6 +1103,7 @@ void Dbtup::initializeTabDescr()
cfreeTdList[i] = RNIL;
}//for
for (regTabDesPtr.i = 0; regTabDesPtr.i < cnoOfTabDescrRec; regTabDesPtr.i++) {
refresh_watch_dog();
ptrAss(regTabDesPtr, tableDescriptor);
regTabDesPtr.p->tabDescr = RNIL;
}//for
@ -1111,6 +1116,7 @@ void Dbtup::initializeUndoPage()
for (undoPagep.i = 0;
undoPagep.i < cnoOfUndoPage;
undoPagep.i = undoPagep.i + ZUB_SEGMENT_SIZE) {
refresh_watch_dog();
ptrAss(undoPagep, undoPage);
undoPagep.p->undoPageWord[ZPAGE_NEXT_POS] = undoPagep.i +
ZUB_SEGMENT_SIZE;

View file

@ -123,6 +123,7 @@ void Dbtup::initializePage()
PagePtr pagePtr;
for (pagePtr.i = 0; pagePtr.i < cnoOfPage; pagePtr.i++) {
ljam();
refresh_watch_dog();
ptrAss(pagePtr, page);
pagePtr.p->pageWord[ZPAGE_PHYSICAL_INDEX] = pagePtr.i;
pagePtr.p->pageWord[ZPAGE_NEXT_POS] = pagePtr.i + 1;

View file

@ -192,6 +192,7 @@ Dbtux::execREAD_CONFIG_REQ(Signal* signal)
IndexPtr indexPtr;
while (1) {
jam();
refresh_watch_dog();
c_indexPool.seize(indexPtr);
if (indexPtr.i == RNIL) {
jam();

View file

@ -554,11 +554,13 @@ Ndbcntr::execCNTR_START_REP(Signal* signal){
}
if(cmasterNodeId != getOwnNodeId()){
jam();
c_start.reset();
return;
}
if(c_start.m_waiting.isclear()){
jam();
c_start.reset();
return;
}
@ -597,6 +599,7 @@ Ndbcntr::execCNTR_START_REQ(Signal * signal){
ndbrequire(false);
case NodeState::SL_STARTING:
case NodeState::SL_STARTED:
jam();
break;
case NodeState::SL_STOPPING_1:
@ -616,9 +619,11 @@ Ndbcntr::execCNTR_START_REQ(Signal * signal){
c_start.m_waiting.set(nodeId);
switch(st){
case NodeState::ST_INITIAL_START:
jam();
c_start.m_withoutLog.set(nodeId);
break;
case NodeState::ST_SYSTEM_RESTART:
jam();
c_start.m_withLog.set(nodeId);
if(starting && lastGci > c_start.m_lastGci){
jam();
@ -631,6 +636,7 @@ Ndbcntr::execCNTR_START_REQ(Signal * signal){
return;
}
if(starting){
jam();
Uint32 i = c_start.m_logNodesCount++;
c_start.m_logNodes[i].m_nodeId = nodeId;
c_start.m_logNodes[i].m_lastGci = req->lastGci;
@ -652,11 +658,12 @@ Ndbcntr::execCNTR_START_REQ(Signal * signal){
}
if(starting){
jam();
trySystemRestart(signal);
} else {
jam();
startWaitingNodes(signal);
}
return;
}
@ -670,6 +677,7 @@ Ndbcntr::startWaitingNodes(Signal * signal){
NodeState::StartType nrType = NodeState::ST_NODE_RESTART;
if(c_start.m_withoutLog.get(nodeId)){
jam();
nrType = NodeState::ST_INITIAL_NODE_RESTART;
}
@ -706,6 +714,7 @@ Ndbcntr::startWaitingNodes(Signal * signal){
char buf[100];
if(!c_start.m_withLog.isclear()){
jam();
ndbout_c("Starting nodes w/ log: %s", c_start.m_withLog.getText(buf));
NodeReceiverGroup rg(NDBCNTR, c_start.m_withLog);
@ -716,6 +725,7 @@ Ndbcntr::startWaitingNodes(Signal * signal){
}
if(!c_start.m_withoutLog.isclear()){
jam();
ndbout_c("Starting nodes wo/ log: %s", c_start.m_withoutLog.getText(buf));
NodeReceiverGroup rg(NDBCNTR, c_start.m_withoutLog);
conf->startType = NodeState::ST_INITIAL_NODE_RESTART;
@ -777,6 +787,7 @@ Ndbcntr::trySystemRestart(Signal* signal){
jam();
return false;
}
jam();
srType = NodeState::ST_INITIAL_START;
c_start.m_starting = c_start.m_withoutLog; // Used for starting...
c_start.m_withoutLog.clear();
@ -793,13 +804,11 @@ Ndbcntr::trySystemRestart(Signal* signal){
// If we lose with all nodes, then we're in trouble
ndbrequire(!allNodes);
return false;
break;
case CheckNodeGroups::Partitioning:
jam();
bool allowPartition = (c_start.m_startPartitionedTimeout != (Uint64)~0);
if(allNodes){
jam();
if(allowPartition){
jam();
break;
@ -1043,8 +1052,10 @@ void Ndbcntr::ph5ALab(Signal* signal)
return;
case NodeState::ST_NODE_RESTART:
case NodeState::ST_INITIAL_NODE_RESTART:
jam();
break;
case NodeState::ST_ILLEGAL_TYPE:
jam();
break;
}
ndbrequire(false);

View file

@ -258,7 +258,6 @@ void Qmgr::execCONNECT_REP(Signal* signal)
{
const Uint32 nodeId = signal->theData[0];
c_connectedNodes.set(nodeId);
NodeRecPtr nodePtr;
nodePtr.i = getOwnNodeId();
ptrCheckGuard(nodePtr, MAX_NODES, nodeRec);
@ -679,7 +678,6 @@ void Qmgr::execCM_REGREF(Signal* signal)
UintR TaddNodeno = signal->theData[1];
UintR TrefuseReason = signal->theData[2];
Uint32 candidate = signal->theData[3];
DEBUG_START3(signal, TrefuseReason);
if(candidate != cpresidentCandidate){
@ -768,7 +766,6 @@ void Qmgr::execCM_REGREF(Signal* signal)
Uint64 now = NdbTick_CurrentMillisecond();
if((c_regReqReqRecv == cnoOfNodes) || now > c_stopElectionTime){
jam();
electionWon();
sendSttorryLab(signal);

View file

@ -641,7 +641,7 @@ SimulatedBlock::allocRecord(const char * type, size_t s, size_t n) const
void* p = NULL;
size_t size = n*s;
refresh_watch_dog();
if (size > 0){
#ifdef VM_TRACE_MEM
ndbout_c("%s::allocRecord(%s, %u, %u) = %u bytes",
@ -660,8 +660,7 @@ SimulatedBlock::allocRecord(const char * type, size_t s, size_t n) const
snprintf(buf2, sizeof(buf2), "Requested: %ux%u = %u bytes", (Uint32)s, (Uint32)n, (Uint32)size);
ERROR_SET(fatal, ERR_MEMALLOC, buf1, buf2);
}
#ifdef NDB_DEBUG_FULL
// Set the allocated memory to zero
#ifndef NDB_PURIFY
#if defined NDB_OSE
@ -685,6 +684,7 @@ SimulatedBlock::allocRecord(const char * type, size_t s, size_t n) const
memset(p, 0xF1, size);
#endif
#endif
#endif
}
return p;
@ -703,6 +703,12 @@ SimulatedBlock::deallocRecord(void ** ptr,
}
}
void
SimulatedBlock::refresh_watch_dog()
{
globalData.incrementWatchDogCounter(1);
}
void
SimulatedBlock::progError(int line, int err_code, const char* extra) const {
jamLine(line);

View file

@ -304,7 +304,13 @@ protected:
BlockNumber number() const;
BlockReference reference() const;
NodeId getOwnNodeId() const;
/**
* Refresh Watch Dog in initialising code
*
*/
void refresh_watch_dog();
/**
* Prog error
* This function should be called when this node should be shutdown