Corrected construct of faked Node fail signals in ndb SignalSender

This commit is contained in:
tulin@dl145b.mysql.com 2005-09-12 17:49:48 +02:00
parent bdc33e2356
commit 63aef9d58b
2 changed files with 10 additions and 5 deletions

View file

@ -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

View file

@ -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);