23 #define DEBUG(x) { ndbout << "Qmgr::" << x << endl; }
28 creadyDistCom = ZFALSE;
31 nodeRec =
new NodeRec[MAX_NODES];
32 for (Uint32
i = 0;
i<MAX_NODES;
i++)
34 nodeRec[
i].m_secret = 0;
37 cnoCommitFailedNodes = 0;
39 c_clusterNodes.
clear();
40 c_stopReq.senderRef = 0;
49 m_micro_gcp_enabled =
false;
50 m_hb_order_config_used =
false;
53 nodePtr.i = getOwnNodeId();
54 ptrAss(nodePtr, nodeRec);
55 nodePtr.p->blockRef = reference();
57 c_connectedNodes.
set(getOwnNodeId());
58 setNodeInfo(getOwnNodeId()).
m_version = NDB_VERSION;
65 m_ctx.m_config.getOwnConfigIterator();
68 Uint32 hbDBAPI = 1500;
69 ndb_mgm_get_int_parameter(p, CFG_DB_API_HEARTBEAT_INTERVAL, &hbDBAPI);
71 setHbApiDelay(hbDBAPI);
79 cprepareFailureNr = 1;
81 cnoPrepFailedNodes = 0;
82 creadyDistCom = ZFALSE;
84 c_start.m_president_candidate = ZNIL;
85 c_start.m_president_candidate_gci = 0;
89 cdelayRegreq = ZDELAY_REGREQ;
90 cactivateApiCheck = 0;
91 c_allow_api_connect = 0;
92 ctoStatus = Q_NOT_ACTIVE;
93 clatestTransactionCheck = 0;
96 void Qmgr::initRecords()
104 BLOCK_CONSTRUCTOR(
Qmgr);
107 addRecSignal(GSN_DUMP_STATE_ORD, &Qmgr::execDUMP_STATE_ORD);
108 addRecSignal(GSN_STOP_REQ, &Qmgr::execSTOP_REQ);
109 addRecSignal(GSN_DEBUG_SIG, &Qmgr::execDEBUG_SIG);
110 addRecSignal(GSN_CONTINUEB, &Qmgr::execCONTINUEB);
111 addRecSignal(GSN_CM_HEARTBEAT, &Qmgr::execCM_HEARTBEAT);
112 addRecSignal(GSN_CM_ADD, &Qmgr::execCM_ADD);
113 addRecSignal(GSN_CM_ACKADD, &Qmgr::execCM_ACKADD);
114 addRecSignal(GSN_CM_REGREQ, &Qmgr::execCM_REGREQ);
115 addRecSignal(GSN_CM_REGCONF, &Qmgr::execCM_REGCONF);
116 addRecSignal(GSN_CM_REGREF, &Qmgr::execCM_REGREF);
117 addRecSignal(GSN_CM_NODEINFOREQ, &Qmgr::execCM_NODEINFOREQ);
118 addRecSignal(GSN_CM_NODEINFOCONF, &Qmgr::execCM_NODEINFOCONF);
119 addRecSignal(GSN_CM_NODEINFOREF, &Qmgr::execCM_NODEINFOREF);
120 addRecSignal(GSN_PREP_FAILREQ, &Qmgr::execPREP_FAILREQ);
121 addRecSignal(GSN_PREP_FAILCONF, &Qmgr::execPREP_FAILCONF);
122 addRecSignal(GSN_PREP_FAILREF, &Qmgr::execPREP_FAILREF);
123 addRecSignal(GSN_COMMIT_FAILREQ, &Qmgr::execCOMMIT_FAILREQ);
124 addRecSignal(GSN_COMMIT_FAILCONF, &Qmgr::execCOMMIT_FAILCONF);
125 addRecSignal(GSN_FAIL_REP, &Qmgr::execFAIL_REP);
126 addRecSignal(GSN_PRES_TOREQ, &Qmgr::execPRES_TOREQ);
127 addRecSignal(GSN_PRES_TOCONF, &Qmgr::execPRES_TOCONF);
130 addRecSignal(GSN_CONNECT_REP, &Qmgr::execCONNECT_REP);
131 addRecSignal(GSN_NDB_FAILCONF, &Qmgr::execNDB_FAILCONF);
132 addRecSignal(GSN_NF_COMPLETEREP, &Qmgr::execNF_COMPLETEREP);
133 addRecSignal(GSN_READ_CONFIG_REQ, &Qmgr::execREAD_CONFIG_REQ);
134 addRecSignal(GSN_STTOR, &Qmgr::execSTTOR);
135 addRecSignal(GSN_CLOSE_COMCONF, &Qmgr::execCLOSE_COMCONF);
136 addRecSignal(GSN_API_REGREQ, &Qmgr::execAPI_REGREQ);
137 addRecSignal(GSN_API_VERSION_REQ, &Qmgr::execAPI_VERSION_REQ);
138 addRecSignal(GSN_DISCONNECT_REP, &Qmgr::execDISCONNECT_REP);
139 addRecSignal(GSN_API_FAILREQ, &Qmgr::execAPI_FAILREQ);
140 addRecSignal(GSN_API_FAILCONF, &Qmgr::execAPI_FAILCONF);
141 addRecSignal(GSN_READ_NODESREQ, &Qmgr::execREAD_NODESREQ);
142 addRecSignal(GSN_API_BROADCAST_REP, &Qmgr::execAPI_BROADCAST_REP);
144 addRecSignal(GSN_NODE_FAILREP, &Qmgr::execNODE_FAILREP);
145 addRecSignal(GSN_ALLOC_NODEID_REQ, &Qmgr::execALLOC_NODEID_REQ);
146 addRecSignal(GSN_ALLOC_NODEID_CONF, &Qmgr::execALLOC_NODEID_CONF);
147 addRecSignal(GSN_ALLOC_NODEID_REF, &Qmgr::execALLOC_NODEID_REF);
148 addRecSignal(GSN_ENABLE_COMCONF, &Qmgr::execENABLE_COMCONF);
151 addRecSignal(GSN_ARBIT_PREPREQ, &Qmgr::execARBIT_PREPREQ);
152 addRecSignal(GSN_ARBIT_PREPCONF, &Qmgr::execARBIT_PREPCONF);
153 addRecSignal(GSN_ARBIT_PREPREF, &Qmgr::execARBIT_PREPREF);
154 addRecSignal(GSN_ARBIT_STARTCONF, &Qmgr::execARBIT_STARTCONF);
155 addRecSignal(GSN_ARBIT_STARTREF, &Qmgr::execARBIT_STARTREF);
156 addRecSignal(GSN_ARBIT_CHOOSECONF, &Qmgr::execARBIT_CHOOSECONF);
157 addRecSignal(GSN_ARBIT_CHOOSEREF, &Qmgr::execARBIT_CHOOSEREF);
158 addRecSignal(GSN_ARBIT_STOPREP, &Qmgr::execARBIT_STOPREP);
160 addRecSignal(GSN_READ_NODESREF, &Qmgr::execREAD_NODESREF);
161 addRecSignal(GSN_READ_NODESCONF, &Qmgr::execREAD_NODESCONF);
163 addRecSignal(GSN_DIH_RESTARTREF, &Qmgr::execDIH_RESTARTREF);
164 addRecSignal(GSN_DIH_RESTARTCONF, &Qmgr::execDIH_RESTARTCONF);
165 addRecSignal(GSN_NODE_VERSION_REP, &Qmgr::execNODE_VERSION_REP);
166 addRecSignal(GSN_START_ORD, &Qmgr::execSTART_ORD);
168 addRecSignal(GSN_UPGRADE_PROTOCOL_ORD, &Qmgr::execUPGRADE_PROTOCOL_ORD);
171 addRecSignal(GSN_NODE_PING_REQ, &Qmgr::execNODE_PINGREQ);
172 addRecSignal(GSN_NODE_PING_CONF, &Qmgr::execNODE_PINGCONF);
183 BLOCK_FUNCTIONS(
Qmgr)