Commit c6911d6f authored by unknown's avatar unknown
Browse files

ndb - bug#24105

  Handle not started nodes correctly (for X restart)
  i.e dont wait for NF_COMPLETEREP
      but settle with NODEFAIL_REP


storage/ndb/src/mgmsrv/MgmtSrvr.cpp:
  Handle not started nodes correctly
  i.e dont wait for NF_COMPLETEREP
      but settle with NODEFAIL_REP
parent 5c1f4b64
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -972,6 +972,15 @@ int MgmtSrvr::sendSTOP_REQ(const Vector<NodeId> &node_ids,
  StopReq* const stopReq = CAST_PTR(StopReq, ssig.getDataPtrSend());
  ssig.set(ss, TestOrd::TraceAPI, NDBCNTR, GSN_STOP_REQ, StopReq::SignalLength);

  NdbNodeBitmask notstarted;
  for (Uint32 i = 0; i<node_ids.size(); i++)
  {
    Uint32 nodeId = node_ids[i];
    ClusterMgr::Node node = theFacade->theClusterMgr->getNodeInfo(nodeId);
    if (node.m_state.startLevel != NodeState::SL_STARTED)
      notstarted.set(nodeId);
  }
  
  stopReq->requestInfo = 0;
  stopReq->apiTimeout = 5000;
  stopReq->transactionTimeout = 1000;
@@ -1142,6 +1151,14 @@ int MgmtSrvr::sendSTOP_REQ(const Vector<NodeId> &node_ids,
    case GSN_NODE_FAILREP:{
      const NodeFailRep * const rep =
	CAST_CONSTPTR(NodeFailRep, signal->getDataPtr());
      NdbNodeBitmask mask;
      char buf[100];
      mask.assign(NdbNodeBitmask::Size, rep->theNodes);
      mask.bitAND(notstarted);
      nodes.bitANDC(mask);
      
      if (singleUserNodeId == 0)
	stoppedNodes.bitOR(mask);
      break;
    }
    default: