mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 05:52:27 +01:00
Bug #19645 Data Node hangs in phase 100: distribute API_FAIL_REQ so all nodes have the same view of what API's are connected
This commit is contained in:
parent
9509145a9d
commit
d951bc61ff
3 changed files with 27 additions and 0 deletions
|
@ -248,6 +248,7 @@ private:
|
|||
void execAPI_FAILCONF(Signal* signal);
|
||||
void execREAD_NODESREQ(Signal* signal);
|
||||
void execSET_VAR_REQ(Signal* signal);
|
||||
void execAPI_FAILREQ(Signal* signal);
|
||||
|
||||
void execREAD_NODESREF(Signal* signal);
|
||||
void execREAD_NODESCONF(Signal* signal);
|
||||
|
|
|
@ -81,6 +81,7 @@ Qmgr::Qmgr(Block_context& ctx)
|
|||
addRecSignal(GSN_API_REGREQ, &Qmgr::execAPI_REGREQ);
|
||||
addRecSignal(GSN_API_VERSION_REQ, &Qmgr::execAPI_VERSION_REQ);
|
||||
addRecSignal(GSN_DISCONNECT_REP, &Qmgr::execDISCONNECT_REP);
|
||||
addRecSignal(GSN_API_FAILREQ, &Qmgr::execAPI_FAILREQ);
|
||||
addRecSignal(GSN_API_FAILCONF, &Qmgr::execAPI_FAILCONF);
|
||||
addRecSignal(GSN_READ_NODESREQ, &Qmgr::execREAD_NODESREQ);
|
||||
addRecSignal(GSN_SET_VAR_REQ, &Qmgr::execSET_VAR_REQ);
|
||||
|
|
|
@ -2338,6 +2338,8 @@ void Qmgr::sendApiFailReq(Signal* signal, Uint16 failedNodeNo)
|
|||
ndbrequire(failedNodePtr.p->failState == NORMAL);
|
||||
|
||||
failedNodePtr.p->failState = WAITING_FOR_FAILCONF1;
|
||||
NodeReceiverGroup rg(QMGR, c_clusterNodes);
|
||||
sendSignal(rg, GSN_API_FAILREQ, signal, 2, JBA);
|
||||
sendSignal(DBTC_REF, GSN_API_FAILREQ, signal, 2, JBA);
|
||||
sendSignal(DBDICT_REF, GSN_API_FAILREQ, signal, 2, JBA);
|
||||
sendSignal(SUMA_REF, GSN_API_FAILREQ, signal, 2, JBA);
|
||||
|
@ -2361,6 +2363,29 @@ void Qmgr::sendApiFailReq(Signal* signal, Uint16 failedNodeNo)
|
|||
CloseComReqConf::SignalLength, JBA);
|
||||
}//Qmgr::sendApiFailReq()
|
||||
|
||||
void Qmgr::execAPI_FAILREQ(Signal* signal)
|
||||
{
|
||||
jamEntry();
|
||||
NodeRecPtr failedNodePtr;
|
||||
failedNodePtr.i = signal->theData[0];
|
||||
// signal->theData[1] == QMGR_REF
|
||||
ptrCheckGuard(failedNodePtr, MAX_NODES, nodeRec);
|
||||
|
||||
ndbout_c("Qmgr::execAPI_FAILREQ node %d", failedNodePtr.i);
|
||||
|
||||
ndbrequire(getNodeInfo(failedNodePtr.i).getType() != NodeInfo::DB);
|
||||
|
||||
// ignore if api not active
|
||||
if (failedNodePtr.p->phase != ZAPI_ACTIVE)
|
||||
return;
|
||||
|
||||
signal->theData[0] = NDB_LE_Disconnected;
|
||||
signal->theData[1] = failedNodePtr.i;
|
||||
sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB);
|
||||
|
||||
node_failed(signal, failedNodePtr.i);
|
||||
}
|
||||
|
||||
void Qmgr::execAPI_FAILCONF(Signal* signal)
|
||||
{
|
||||
NodeRecPtr failedNodePtr;
|
||||
|
|
Loading…
Reference in a new issue