Corrected construct of faked Node fail signals in ndb SignalSender

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