#include <ndb_limits.h>#include <ndb_version.h>#include <NdbOut.hpp>#include "Dbdih.hpp"#include "Configuration.hpp"#include <signaldata/BlockCommitOrd.hpp>#include <signaldata/CheckNodeGroups.hpp>#include <signaldata/CreateFrag.hpp>#include <signaldata/CopyActive.hpp>#include <signaldata/CopyFrag.hpp>#include <signaldata/CopyGCIReq.hpp>#include <signaldata/DiAddTab.hpp>#include <signaldata/DictStart.hpp>#include <signaldata/DiGetNodes.hpp>#include <signaldata/DihContinueB.hpp>#include <signaldata/DihSwitchReplica.hpp>#include <signaldata/DumpStateOrd.hpp>#include <signaldata/EmptyLcp.hpp>#include <signaldata/EndTo.hpp>#include <signaldata/EventReport.hpp>#include <signaldata/GCPSave.hpp>#include <signaldata/HotSpareRep.hpp>#include <signaldata/MasterGCP.hpp>#include <signaldata/MasterLCP.hpp>#include <signaldata/NFCompleteRep.hpp>#include <signaldata/NodeFailRep.hpp>#include <signaldata/ReadNodesConf.hpp>#include <signaldata/StartFragReq.hpp>#include <signaldata/StartInfo.hpp>#include <signaldata/StartMe.hpp>#include <signaldata/StartPerm.hpp>#include <signaldata/StartRec.hpp>#include <signaldata/StartTo.hpp>#include <signaldata/StopPerm.hpp>#include <signaldata/StopMe.hpp>#include <signaldata/TestOrd.hpp>#include <signaldata/UpdateTo.hpp>#include <signaldata/WaitGCP.hpp>#include <signaldata/DihStartTab.hpp>#include <signaldata/LCP.hpp>#include <signaldata/SystemError.hpp>#include <signaldata/DropTab.hpp>#include <signaldata/AlterTab.hpp>#include <signaldata/PrepDropTab.hpp>#include <signaldata/SumaImpl.hpp>#include <signaldata/DictTabInfo.hpp>#include <signaldata/CreateFragmentation.hpp>#include <signaldata/LqhFrag.hpp>#include <signaldata/FsOpenReq.hpp>#include <signaldata/DihFragCount.hpp>#include <signaldata/DictLock.hpp>#include <DebuggerNames.hpp>#include <EventLogger.hpp>Include dependency graph for DbdihMain.cpp:

Go to the source code of this file.
Classes | |
| struct | MASTERLCP_StateTransitions |
Defines | |
| #define | DBDIH_C |
| #define | SYSFILE ((Sysfile *)&sysfileData[0]) |
| #define | RETURN_IF_NODE_NOT_ALIVE(node) |
| #define | RETURN_IF_TAKE_OVER_INTERRUPTED(takeOverIndex, regTOPtr) |
| #define | receiveLoopMacro(sigName, receiveNodeId) |
| #define | sendLoopMacro(sigName, signalRoutine) |
| #define | gth(x, y) ndbrequire(((int)x)>((int)y)) |
Functions | |
| static Uint32 | prevLcpNo (Uint32 lcpNo) |
| static Uint32 | nextLcpNo (Uint32 lcpNo) |
| NdbOut & | operator<< (NdbOut &out, const Dbdih::LcpMasterTakeOverState state) |
| static void | inc_node_or_group (Uint32 &node, Uint32 max_node) |
| static void | set_default_node_groups (Signal *signal, Uint32 noFrags) |
Variables | |
| EventLogger | g_eventLogger |
| static const MASTERLCP_StateTransitions | g_masterLCPTakeoverStateTransitions [] |
| const Uint32 | g_masterLCPTakeoverStateTransitionsRows |
| #define DBDIH_C |
Definition at line 17 of file DbdihMain.cpp.
| #define receiveLoopMacro | ( | sigName, | |||
| receiveNodeId | ) |
Value:
{ \
c_##sigName##_Counter.clearWaitingFor(receiveNodeId); \
if(c_##sigName##_Counter.done() == false){ \
jam(); \
return; \
} \
}
Definition at line 93 of file DbdihMain.cpp.
Referenced by Dbdih::execCOPY_GCICONF(), Dbdih::execCOPY_TABCONF(), Dbdih::execCREATE_FRAGCONF(), Dbdih::execEMPTY_LCP_CONF(), Dbdih::execEND_TOCONF(), Dbdih::execGCP_NODEFINISH(), Dbdih::execGCP_PREPARECONF(), Dbdih::execINCL_NODECONF(), Dbdih::execMASTER_GCPCONF(), Dbdih::execMASTER_GCPREF(), Dbdih::execMASTER_LCPREF(), Dbdih::execSTART_LCP_CONF(), Dbdih::execSTART_RECCONF(), Dbdih::execSTART_TOCONF(), Dbdih::execSTOP_ME_CONF(), Dbdih::execTC_CLOPSIZECONF(), Dbdih::execTCGETOPSIZECONF(), Dbdih::execUPDATE_TOCONF(), Dbdih::GCP_SAVEhandling(), Dbdih::startInfoReply(), and Dbdih::switchReplicaReply().
| #define RETURN_IF_NODE_NOT_ALIVE | ( | node | ) |
Value:
if (!checkNodeAlive((node))) { \ jam(); \ return; \ } \
Definition at line 79 of file DbdihMain.cpp.
Referenced by Dbdih::execCREATE_FRAGCONF(), Dbdih::execCREATE_FRAGREQ(), Dbdih::execEND_TOCONF(), Dbdih::execEND_TOREQ(), Dbdih::execSTART_TOCONF(), Dbdih::execSTART_TOREQ(), Dbdih::execUPDATE_TOCONF(), and Dbdih::execUPDATE_TOREQ().
| #define RETURN_IF_TAKE_OVER_INTERRUPTED | ( | takeOverIndex, | |||
| regTOPtr | ) |
Value:
regTOPtr.i = takeOverIndex; \ ptrCheckGuard(regTOPtr, MAX_NDB_NODES, takeOverRecord); \ if (checkToInterrupted(regTOPtr)) { \ jam(); \ return; \ } \
Definition at line 85 of file DbdihMain.cpp.
Referenced by Dbdih::execCOPY_FRAGCONF(), Dbdih::execCOPY_FRAGREF(), Dbdih::prepareSendCreateFragReq(), Dbdih::sendCreateFragReq(), Dbdih::sendEndTo(), Dbdih::sendStartTo(), Dbdih::sendUpdateTo(), Dbdih::startNextCopyFragment(), Dbdih::startTakeOver(), and Dbdih::toCopyFragLab().
| #define sendLoopMacro | ( | sigName, | |||
| signalRoutine | ) |
Value:
{ \
c_##sigName##_Counter.clearWaitingFor(); \
NodeRecordPtr specNodePtr; \
specNodePtr.i = cfirstAliveNode; \
do { \
jam(); \
ptrCheckGuard(specNodePtr, MAX_NDB_NODES, nodeRecord); \
c_##sigName##_Counter.setWaitingFor(specNodePtr.i); \
signalRoutine(signal, specNodePtr.i); \
specNodePtr.i = specNodePtr.p->nextNode; \
} while (specNodePtr.i != RNIL); \
}
Definition at line 102 of file DbdihMain.cpp.
Referenced by Dbdih::checkEmptyLcpComplete(), Dbdih::checkTcCounterLab(), Dbdih::completeRestartLab(), Dbdih::copyGciLab(), Dbdih::execCONTINUEB(), Dbdih::execSTART_PERMREQ(), Dbdih::execSTOP_ME_REQ(), Dbdih::gcpBlockedLab(), Dbdih::gcpcommitreqLab(), Dbdih::gcpsavereqLab(), Dbdih::sendCreateFragReq(), Dbdih::sendEndTo(), Dbdih::sendStartTo(), Dbdih::sendUpdateTo(), Dbdih::startGcpLab(), Dbdih::startGcpMasterTakeOver(), Dbdih::startLcpMasterTakeOver(), Dbdih::startLcpMutex_locked(), Dbdih::startLcpMutex_unlocked(), and Dbdih::switchReplica().
| #define SYSFILE ((Sysfile *)&sysfileData[0]) |
Definition at line 77 of file DbdihMain.cpp.
Referenced by Dbdih::allNodesLcpCompletedLab(), Dbdih::closingGcpLab(), Dbdih::dump_replica_info(), Dbdih::execCHECKNODEGROUPSREQ(), Dbdih::execCOPY_GCICONF(), Dbdih::execCOPY_GCIREQ(), Dbdih::execGCP_SAVECONF(), Dbdih::execGETGCIREQ(), Dbdih::execLCP_COMPLETE_REP(), Dbdih::execMASTER_GCPCONF(), Dbdih::execMASTER_GCPREQ(), Dbdih::execREAD_NODESCONF(), Dbdih::execSTART_PERMREQ(), Dbdih::execTCGETOPSIZECONF(), Dbdih::failedNodeLcpHandling(), Dbdih::findMinGci(), Dbdih::GCP_SAVEhandling(), Dbdih::initRestartInfo(), Dbdih::invalidateLcpInfoAfterSr(), Dbdih::makeNodeGroups(), Dbdih::MASTER_GCPhandling(), Dbdih::MASTER_LCPhandling(), Dbdih::ndbStartReqLab(), Dbdih::newCrashedReplica(), Dbdih::nodeRestartTakeOver(), Dbdih::readingGcpLab(), Dbdih::readReplica(), Dbdih::removeOldCrashedReplicas(), Dbdih::removeTooNewCrashedReplicas(), Dbdih::resetReplicaSr(), Dbdih::searchStoredReplicas(), Dbdih::selectMasterCandidateAndSend(), Dbdih::sendAddFragreq(), Dbdih::sendLastLCP_FRAG_ORD(), Dbdih::sendLCP_COMPLETE_REP(), Dbdih::sendLCP_FRAG_ORD(), Dbdih::sendMASTER_LCPCONF(), Dbdih::sendSTART_RECREQ(), Dbdih::setInitialActiveStatus(), Dbdih::setNodeActiveStatus(), Dbdih::setNodeGroups(), Dbdih::setNodeRestartInfoBits(), Dbdih::startFragment(), Dbdih::startLcpMutex_locked(), Dbdih::startNextChkpt(), Dbdih::startTakeOver(), Dbdih::storeNewLcpIdLab(), Dbdih::systemRestartTakeOverLab(), and Dbdih::takeOverCompleted().
Definition at line 6518 of file DbdihMain.cpp.
Referenced by Dbdih::execCREATE_FRAGMENTATION_REQ().
06519 { 06520 Uint32 next = node + 1; 06521 node = (next == max_node ? 0 : next); 06522 }
Here is the caller graph for this function:

Definition at line 126 of file DbdihMain.cpp.
References MAX_LCP_STORED.
Referenced by Dbdih::findMinGci(), and Dbdih::nr_start_fragment().
00126 { 00127 lcpNo++; 00128 if(lcpNo == MAX_LCP_STORED) 00129 return 0; 00130 return lcpNo; 00131 }
Here is the caller graph for this function:

| NdbOut& operator<< | ( | NdbOut & | out, | |
| const Dbdih::LcpMasterTakeOverState | state | |||
| ) |
Definition at line 5949 of file DbdihMain.cpp.
References Dbdih::LMTOS_ALL_ACTIVE, Dbdih::LMTOS_ALL_IDLE, Dbdih::LMTOS_COPY_ONGOING, Dbdih::LMTOS_IDLE, Dbdih::LMTOS_INITIAL, Dbdih::LMTOS_LCP_CONCLUDING, Dbdih::LMTOS_WAIT_EMPTY_LCP, and Dbdih::LMTOS_WAIT_LCP_FRAG_REP.
05949 { 05950 switch(state){ 05951 case Dbdih::LMTOS_IDLE: 05952 out << "LMTOS_IDLE"; 05953 break; 05954 case Dbdih::LMTOS_WAIT_EMPTY_LCP: 05955 out << "LMTOS_WAIT_EMPTY_LCP"; 05956 break; 05957 case Dbdih::LMTOS_WAIT_LCP_FRAG_REP: 05958 out << "LMTOS_WAIT_EMPTY_LCP"; 05959 break; 05960 case Dbdih::LMTOS_INITIAL: 05961 out << "LMTOS_INITIAL"; 05962 break; 05963 case Dbdih::LMTOS_ALL_IDLE: 05964 out << "LMTOS_ALL_IDLE"; 05965 break; 05966 case Dbdih::LMTOS_ALL_ACTIVE: 05967 out << "LMTOS_ALL_ACTIVE"; 05968 break; 05969 case Dbdih::LMTOS_LCP_CONCLUDING: 05970 out << "LMTOS_LCP_CONCLUDING"; 05971 break; 05972 case Dbdih::LMTOS_COPY_ONGOING: 05973 out << "LMTOS_COPY_ONGOING"; 05974 break; 05975 } 05976 return out; 05977 }
Definition at line 118 of file DbdihMain.cpp.
References MAX_LCP_STORED.
Referenced by Dbdih::findStartGci(), Dbdih::readReplica(), and Dbdih::resetReplicaLcp().
00118 { 00119 if(lcpNo == 0) 00120 return MAX_LCP_STORED - 1; 00121 return lcpNo - 1; 00122 }
Here is the caller graph for this function:

Definition at line 6527 of file DbdihMain.cpp.
References Signal::theData, and UNDEF_NODEGROUP.
Referenced by Dbdih::execCREATE_FRAGMENTATION_REQ().
06528 { 06529 Uint16 *node_group_array = (Uint16*)&signal->theData[25]; 06530 Uint32 i; 06531 node_group_array[0] = 0; 06532 for (i = 1; i < noFrags; i++) 06533 node_group_array[i] = UNDEF_NODEGROUP; 06534 }
Here is the caller graph for this function:

const MASTERLCP_StateTransitions g_masterLCPTakeoverStateTransitions[] [static] |
Initial value:
sizeof(g_masterLCPTakeoverStateTransitions) / sizeof(struct MASTERLCP_StateTransitions)
Definition at line 6075 of file DbdihMain.cpp.
1.4.7

