From a100123ab3f93afa9a65c19893895c596aacbac7 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 12 Sep 2005 22:51:44 +0200 Subject: adopted to corrected ndb SendSignal Node failrep --- ndb/src/mgmsrv/MgmtSrvr.cpp | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'ndb/src') 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; } -- cgit v1.2.1