summaryrefslogtreecommitdiff
path: root/ndb
diff options
context:
space:
mode:
authortomas@poseidon.ndb.mysql.com <>2005-09-12 22:51:44 +0200
committertomas@poseidon.ndb.mysql.com <>2005-09-12 22:51:44 +0200
commitf02a3f5476caeac060ba9133a5bd7b0c882890b0 (patch)
treeed69655c4180ddeb1d0da74742a551dd02eb9f4e /ndb
parenta8447b6a7f3c1673e956138b0b8da89b258ee788 (diff)
downloadmariadb-git-f02a3f5476caeac060ba9133a5bd7b0c882890b0.tar.gz
adopted to corrected ndb SendSignal Node failrep
Diffstat (limited to 'ndb')
-rw-r--r--ndb/src/mgmsrv/MgmtSrvr.cpp21
1 files changed, 15 insertions, 6 deletions
diff --git a/ndb/src/mgmsrv/MgmtSrvr.cpp b/ndb/src/mgmsrv/MgmtSrvr.cpp
index dab99cb83db..b525d14cc2f 100644
--- a/ndb/src/mgmsrv/MgmtSrvr.cpp
+++ b/ndb/src/mgmsrv/MgmtSrvr.cpp
@@ -765,7 +765,7 @@ MgmtSrvr::sendVersionReq(int v_nodeId, Uint32 &version)
case GSN_NODE_FAILREP:{
const NodeFailRep * const rep =
CAST_CONSTPTR(NodeFailRep, signal->getDataPtr());
- if (rep->failNo == nodeId)
+ if (NodeBitmask::get(rep->theNodes,nodeId))
do_send = 1; // retry with other node
continue;
}
@@ -894,14 +894,23 @@ int MgmtSrvr::sendSTOP_REQ(NodeId nodeId,
case GSN_NODE_FAILREP:{
const NodeFailRep * const rep =
CAST_CONSTPTR(NodeFailRep, signal->getDataPtr());
+ NodeBitmask failedNodes;
+ failedNodes.assign(NodeBitmask::Size, rep->theNodes);
#ifdef VM_TRACE
- ndbout_c("Node %d failed", rep->failNo);
+ {
+ ndbout << "Failed nodes:";
+ for (unsigned i = 0; i < 32*NodeBitmask::Size; i++)
+ if(failedNodes.get(i))
+ ndbout << " " << i;
+ ndbout << endl;
+ }
#endif
- if (nodes.get(rep->failNo))
+ failedNodes.bitAND(nodes);
+ if (!failedNodes.isclear())
{
- nodes.clear(rep->failNo);
+ nodes.bitANDC(failedNodes); // clear the failed nodes
if (singleUserNodeId == 0)
- stoppedNodes.set(rep->failNo);
+ stoppedNodes.bitOR(failedNodes);
}
break;
}
@@ -1244,7 +1253,7 @@ MgmtSrvr::setEventReportingLevelImpl(int nodeId,
case GSN_NODE_FAILREP:{
const NodeFailRep * const rep =
CAST_CONSTPTR(NodeFailRep, signal->getDataPtr());
- if (rep->failNo == nodeId)
+ if (NodeBitmask::get(rep->theNodes,nodeId))
return SEND_OR_RECEIVE_FAILED;
break;
}