Corrected construct of faked Node fail signals in ndb SignalSender

parent bdc33e23
......@@ -2501,10 +2501,7 @@ MgmtSrvr::startBackup(Uint32& backupId, int waitCompleted)
case GSN_NODE_FAILREP:{
const NodeFailRep * const rep =
CAST_CONSTPTR(NodeFailRep, signal->getDataPtr());
#ifdef VM_TRACE
ndbout_c("Node %d failed", rep->failNo);
#endif
if (rep->failNo == nodeId ||
if (NodeBitmask::get(rep->theNodes,nodeId) ||
waitCompleted == 1)
return 1326;
// wait for next signal
......
......@@ -250,14 +250,22 @@ SignalSender::execNodeStatus(void* signalSender,
// node shutdown complete
s->header.theVerId_signalNumber = GSN_NF_COMPLETEREP;
NFCompleteRep *rep = (NFCompleteRep *)s->getDataPtrSend();
rep->blockNo = 0;
rep->nodeId = 0;
rep->failedNodeId = nodeId;
rep->unused = 0;
rep->from = 0;
}
else
{
// node failure
s->header.theVerId_signalNumber = GSN_NODE_FAILREP;
NodeFailRep *rep = (NodeFailRep *)s->getDataPtrSend();
rep->failNo = nodeId;
rep->failNo = 0;
rep->masterNodeId = 0;
rep->noOfNodes = 1;
NodeBitmask::clear(rep->theNodes);
NodeBitmask::set(rep->theNodes,nodeId);
}
ss->m_jobBuffer.push_back(s);
......
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