ndb - bug#18612 - post review fixes

  1) make sure that check_multi_node_shutdown does not proceed (in stop case)
  2) Fix printout
parent 2abc5e2f
...@@ -409,7 +409,7 @@ private: ...@@ -409,7 +409,7 @@ private:
Uint16 ccommitFailedNodes[MAX_NDB_NODES]; Uint16 ccommitFailedNodes[MAX_NDB_NODES];
StopReq c_stopReq; StopReq c_stopReq;
void check_multi_node_shutdown(Signal* signal); bool check_multi_node_shutdown(Signal* signal);
}; };
#endif #endif
...@@ -2296,7 +2296,11 @@ void Qmgr::failReportLab(Signal* signal, Uint16 aFailedNode, ...@@ -2296,7 +2296,11 @@ void Qmgr::failReportLab(Signal* signal, Uint16 aFailedNode,
ptrCheckGuard(failedNodePtr, MAX_NODES, nodeRec); ptrCheckGuard(failedNodePtr, MAX_NODES, nodeRec);
FailRep* rep = (FailRep*)signal->getDataPtr(); FailRep* rep = (FailRep*)signal->getDataPtr();
check_multi_node_shutdown(signal); if (check_multi_node_shutdown(signal))
{
jam();
return;
}
if (failedNodePtr.i == getOwnNodeId()) { if (failedNodePtr.i == getOwnNodeId()) {
jam(); jam();
...@@ -2360,8 +2364,8 @@ void Qmgr::failReportLab(Signal* signal, Uint16 aFailedNode, ...@@ -2360,8 +2364,8 @@ void Qmgr::failReportLab(Signal* signal, Uint16 aFailedNode,
"We(%u) have been declared dead by %u reason: %s(%u)", "We(%u) have been declared dead by %u reason: %s(%u)",
getOwnNodeId(), getOwnNodeId(),
refToNode(signal->getSendersBlockRef()), refToNode(signal->getSendersBlockRef()),
aFailCause, msg ? msg : "<Unknown>",
msg ? msg : "<Unknown>"); aFailCause);
progError(__LINE__, code, buf); progError(__LINE__, code, buf);
return; return;
...@@ -2421,7 +2425,11 @@ void Qmgr::execPREP_FAILREQ(Signal* signal) ...@@ -2421,7 +2425,11 @@ void Qmgr::execPREP_FAILREQ(Signal* signal)
NodeRecPtr myNodePtr; NodeRecPtr myNodePtr;
jamEntry(); jamEntry();
check_multi_node_shutdown(signal); if (check_multi_node_shutdown(signal))
{
jam();
return;
}
PrepFailReqRef * const prepFail = (PrepFailReqRef *)&signal->theData[0]; PrepFailReqRef * const prepFail = (PrepFailReqRef *)&signal->theData[0];
...@@ -4255,7 +4263,7 @@ Qmgr::execSTOP_REQ(Signal* signal) ...@@ -4255,7 +4263,7 @@ Qmgr::execSTOP_REQ(Signal* signal)
} }
} }
void bool
Qmgr::check_multi_node_shutdown(Signal* signal) Qmgr::check_multi_node_shutdown(Signal* signal)
{ {
if (c_stopReq.senderRef && if (c_stopReq.senderRef &&
...@@ -4271,5 +4279,7 @@ Qmgr::check_multi_node_shutdown(Signal* signal) ...@@ -4271,5 +4279,7 @@ Qmgr::check_multi_node_shutdown(Signal* signal)
} else { } else {
EXECUTE_DIRECT(CMVMI, GSN_STOP_ORD, signal, 1); EXECUTE_DIRECT(CMVMI, GSN_STOP_ORD, signal, 1);
} }
return true;
} }
return false;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment