Loading ndb/src/kernel/blocks/ERROR_codes.txt +3 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ Next DBACC 3002 Next DBTUP 4014 Next DBLQH 5043 Next DBDICT 6007 Next DBDIH 7178 Next DBDIH 7181 Next DBTC 8039 Next CMVMI 9000 Next BACKUP 10022 Loading Loading @@ -71,6 +71,8 @@ Delay GCP_SAVEREQ by 10 secs 7177: Delay copying of sysfileData in execCOPY_GCIREQ 7180: Crash master during master-take-over in execMASTER_LCPCONF ERROR CODES FOR TESTING NODE FAILURE, LOCAL CHECKPOINT HANDLING: ----------------------------------------------------------------- Loading ndb/src/kernel/blocks/dbdih/Dbdih.hpp +1 −0 Original line number Diff line number Diff line Loading @@ -1366,6 +1366,7 @@ private: Uint32 csystemnodes; Uint32 currentgcp; Uint32 c_newest_restorable_gci; Uint32 c_set_initial_start_flag; enum GcpMasterTakeOverState { GMTOS_IDLE = 0, Loading ndb/src/kernel/blocks/dbdih/DbdihInit.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,7 @@ void Dbdih::initData() c_blockCommit = false; c_blockCommitNo = 1; cntrlblockref = RNIL; c_set_initial_start_flag = FALSE; }//Dbdih::initData() void Dbdih::initRecords() Loading ndb/src/kernel/blocks/dbdih/DbdihMain.cpp +48 −1 Original line number Diff line number Diff line Loading @@ -666,6 +666,12 @@ void Dbdih::execCOPY_GCIREQ(Signal* signal) { jam(); memcpy(sysfileData, cdata, sizeof(sysfileData)); if (c_set_initial_start_flag) { jam(); Sysfile::setInitialStartOngoing(SYSFILE->systemRestartBits); } } c_copyGCISlave.m_copyReason = reason; Loading Loading @@ -1259,6 +1265,11 @@ void Dbdih::execNDB_STTOR(Signal* signal) // The permission is given by the master node in the alive set. /*-----------------------------------------------------------------------*/ createMutexes(signal, 0); if (cstarttype == NodeState::ST_INITIAL_NODE_RESTART) { jam(); c_set_initial_start_flag = TRUE; // In sysfile... } break; case ZNDB_SPH3: Loading Loading @@ -4612,6 +4623,8 @@ void Dbdih::startLcpMasterTakeOver(Signal* signal, Uint32 nodeId){ jam(); Uint32 oldNode = c_lcpMasterTakeOverState.failedNodeId; c_lcpMasterTakeOverState.minTableId = ~0; c_lcpMasterTakeOverState.minFragId = ~0; c_lcpMasterTakeOverState.failedNodeId = nodeId; Loading @@ -4630,7 +4643,20 @@ Dbdih::startLcpMasterTakeOver(Signal* signal, Uint32 nodeId){ /** * Node failure during master take over... */ g_eventLogger.info("Nodefail during master take over"); g_eventLogger.info("Nodefail during master take over (old: %d)", oldNode); } NodeRecordPtr nodePtr; nodePtr.i = oldNode; if (oldNode > 0 && oldNode < MAX_NDB_NODES) { jam(); ptrCheckGuard(nodePtr, MAX_NDB_NODES, nodeRecord); if (nodePtr.p->m_nodefailSteps.get(NF_LCP_TAKE_OVER)) { jam(); checkLocalNodefailComplete(signal, oldNode, NF_LCP_TAKE_OVER); } } setLocalNodefailHandling(signal, nodeId, NF_LCP_TAKE_OVER); Loading Loading @@ -5647,6 +5673,14 @@ void Dbdih::execMASTER_LCPREQ(Signal* signal) jamEntry(); const BlockReference newMasterBlockref = req->masterRef; if (newMasterBlockref != cmasterdihref) { jam(); ndbout_c("resending GSN_MASTER_LCPREQ"); sendSignalWithDelay(reference(), GSN_MASTER_LCPREQ, signal, signal->getLength(), 50); return; } Uint32 failedNodeId = req->failedNodeId; /** Loading Loading @@ -5947,6 +5981,8 @@ void Dbdih::execMASTER_LCPCONF(Signal* signal) ptrCheckGuard(nodePtr, MAX_NDB_NODES, nodeRecord); nodePtr.p->lcpStateAtTakeOver = lcpState; CRASH_INSERTION(7180); #ifdef VM_TRACE g_eventLogger.info("MASTER_LCPCONF"); printMASTER_LCP_CONF(stdout, &signal->theData[0], 0, 0); Loading Loading @@ -10259,6 +10295,17 @@ Dbdih::sendLCP_COMPLETE_REP(Signal* signal){ sendSignal(c_lcpState.m_masterLcpDihRef, GSN_LCP_COMPLETE_REP, signal, LcpCompleteRep::SignalLength, JBB); /** * Say that an initial node restart does not need to be redone * once node has been part of first LCP */ if (c_set_initial_start_flag && c_lcpState.m_participatingLQH.get(getOwnNodeId())) { jam(); c_set_initial_start_flag = FALSE; } } /*-------------------------------------------------------------------------- */ Loading ndb/src/kernel/blocks/dblqh/DblqhMain.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -11672,7 +11672,8 @@ void Dblqh::execGCP_SAVEREQ(Signal* signal) return; } if(getNodeState().getNodeRestartInProgress()){ if(getNodeState().getNodeRestartInProgress() && cstartRecReq == ZFALSE) { GCPSaveRef * const saveRef = (GCPSaveRef*)&signal->theData[0]; saveRef->dihPtr = dihPtr; saveRef->nodeId = getOwnNodeId(); Loading Loading
ndb/src/kernel/blocks/ERROR_codes.txt +3 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ Next DBACC 3002 Next DBTUP 4014 Next DBLQH 5043 Next DBDICT 6007 Next DBDIH 7178 Next DBDIH 7181 Next DBTC 8039 Next CMVMI 9000 Next BACKUP 10022 Loading Loading @@ -71,6 +71,8 @@ Delay GCP_SAVEREQ by 10 secs 7177: Delay copying of sysfileData in execCOPY_GCIREQ 7180: Crash master during master-take-over in execMASTER_LCPCONF ERROR CODES FOR TESTING NODE FAILURE, LOCAL CHECKPOINT HANDLING: ----------------------------------------------------------------- Loading
ndb/src/kernel/blocks/dbdih/Dbdih.hpp +1 −0 Original line number Diff line number Diff line Loading @@ -1366,6 +1366,7 @@ private: Uint32 csystemnodes; Uint32 currentgcp; Uint32 c_newest_restorable_gci; Uint32 c_set_initial_start_flag; enum GcpMasterTakeOverState { GMTOS_IDLE = 0, Loading
ndb/src/kernel/blocks/dbdih/DbdihInit.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,7 @@ void Dbdih::initData() c_blockCommit = false; c_blockCommitNo = 1; cntrlblockref = RNIL; c_set_initial_start_flag = FALSE; }//Dbdih::initData() void Dbdih::initRecords() Loading
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp +48 −1 Original line number Diff line number Diff line Loading @@ -666,6 +666,12 @@ void Dbdih::execCOPY_GCIREQ(Signal* signal) { jam(); memcpy(sysfileData, cdata, sizeof(sysfileData)); if (c_set_initial_start_flag) { jam(); Sysfile::setInitialStartOngoing(SYSFILE->systemRestartBits); } } c_copyGCISlave.m_copyReason = reason; Loading Loading @@ -1259,6 +1265,11 @@ void Dbdih::execNDB_STTOR(Signal* signal) // The permission is given by the master node in the alive set. /*-----------------------------------------------------------------------*/ createMutexes(signal, 0); if (cstarttype == NodeState::ST_INITIAL_NODE_RESTART) { jam(); c_set_initial_start_flag = TRUE; // In sysfile... } break; case ZNDB_SPH3: Loading Loading @@ -4612,6 +4623,8 @@ void Dbdih::startLcpMasterTakeOver(Signal* signal, Uint32 nodeId){ jam(); Uint32 oldNode = c_lcpMasterTakeOverState.failedNodeId; c_lcpMasterTakeOverState.minTableId = ~0; c_lcpMasterTakeOverState.minFragId = ~0; c_lcpMasterTakeOverState.failedNodeId = nodeId; Loading @@ -4630,7 +4643,20 @@ Dbdih::startLcpMasterTakeOver(Signal* signal, Uint32 nodeId){ /** * Node failure during master take over... */ g_eventLogger.info("Nodefail during master take over"); g_eventLogger.info("Nodefail during master take over (old: %d)", oldNode); } NodeRecordPtr nodePtr; nodePtr.i = oldNode; if (oldNode > 0 && oldNode < MAX_NDB_NODES) { jam(); ptrCheckGuard(nodePtr, MAX_NDB_NODES, nodeRecord); if (nodePtr.p->m_nodefailSteps.get(NF_LCP_TAKE_OVER)) { jam(); checkLocalNodefailComplete(signal, oldNode, NF_LCP_TAKE_OVER); } } setLocalNodefailHandling(signal, nodeId, NF_LCP_TAKE_OVER); Loading Loading @@ -5647,6 +5673,14 @@ void Dbdih::execMASTER_LCPREQ(Signal* signal) jamEntry(); const BlockReference newMasterBlockref = req->masterRef; if (newMasterBlockref != cmasterdihref) { jam(); ndbout_c("resending GSN_MASTER_LCPREQ"); sendSignalWithDelay(reference(), GSN_MASTER_LCPREQ, signal, signal->getLength(), 50); return; } Uint32 failedNodeId = req->failedNodeId; /** Loading Loading @@ -5947,6 +5981,8 @@ void Dbdih::execMASTER_LCPCONF(Signal* signal) ptrCheckGuard(nodePtr, MAX_NDB_NODES, nodeRecord); nodePtr.p->lcpStateAtTakeOver = lcpState; CRASH_INSERTION(7180); #ifdef VM_TRACE g_eventLogger.info("MASTER_LCPCONF"); printMASTER_LCP_CONF(stdout, &signal->theData[0], 0, 0); Loading Loading @@ -10259,6 +10295,17 @@ Dbdih::sendLCP_COMPLETE_REP(Signal* signal){ sendSignal(c_lcpState.m_masterLcpDihRef, GSN_LCP_COMPLETE_REP, signal, LcpCompleteRep::SignalLength, JBB); /** * Say that an initial node restart does not need to be redone * once node has been part of first LCP */ if (c_set_initial_start_flag && c_lcpState.m_participatingLQH.get(getOwnNodeId())) { jam(); c_set_initial_start_flag = FALSE; } } /*-------------------------------------------------------------------------- */ Loading
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -11672,7 +11672,8 @@ void Dblqh::execGCP_SAVEREQ(Signal* signal) return; } if(getNodeState().getNodeRestartInProgress()){ if(getNodeState().getNodeRestartInProgress() && cstartRecReq == ZFALSE) { GCPSaveRef * const saveRef = (GCPSaveRef*)&signal->theData[0]; saveRef->dihPtr = dihPtr; saveRef->nodeId = getOwnNodeId(); Loading