List:Commits« Previous MessageNext Message »
From:tomas Date:February 14 2007 6:12am
Subject:bk commit into 5.1 tree (tomas:1.2111)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2111 07/02/14 13:12:37 tomas@stripped +6 -0
  Merge poseidon.mysql.com:/home/tomas/mysql-5.1-wl2325-5.0
  into  poseidon.mysql.com:/home/tomas/mysql-5.1-wl2325-5.0-drop6

  storage/ndb/src/ndbapi/ClusterMgr.cpp
    1.30 07/02/14 13:12:32 tomas@stripped +0 -0
    manual merge

  storage/ndb/src/mgmsrv/MgmtSrvr.cpp
    1.99 07/02/14 13:12:32 tomas@stripped +0 -1
    manual merge

  configure.in
    1.331 07/02/14 13:12:32 tomas@stripped +0 -2
    manual merge

  cluster_change_hist.txt
    1.20 07/02/14 13:12:32 tomas@stripped +3 -4
    manual merge

  storage/ndb/src/ndbapi/SignalSender.cpp
    1.10 07/02/14 13:03:35 tomas@stripped +0 -0
    Auto merged

  storage/ndb/src/ndbapi/ClusterMgr.hpp
    1.15 07/02/14 13:03:35 tomas@stripped +0 -0
    Auto merged

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	tomas
# Host:	poseidon.mysql.com
# Root:	/home/tomas/mysql-5.1-wl2325-5.0-drop6/RESYNC

--- 1.19/cluster_change_hist.txt	2007-01-31 01:53:10 +07:00
+++ 1.20/cluster_change_hist.txt	2007-02-14 13:12:32 +07:00
@@ -10,6 +10,11 @@ can be found on the MySQL website http:/
 (* == Alcatel has hit this bug)
 
 
+Alcatel Drop 6p5 (not released yet)
+
+merge with drop5p19 containing the following bug fixes:
+    *?Bug #26293 - cluster mgmt node sometimes doesn't receive events from all nodes on restart
+
 -------------------------------
 
 Alcatel Drop 6p4 (Tue 30 Jan 2007)

--- 1.98/storage/ndb/src/mgmsrv/MgmtSrvr.cpp	2007-01-04 21:35:22 +07:00
+++ 1.99/storage/ndb/src/mgmsrv/MgmtSrvr.cpp	2007-02-14 13:12:32 +07:00
@@ -679,7 +679,7 @@ int MgmtSrvr::okToSendTo(NodeId nodeId, 
     return WRONG_PROCESS_TYPE;
   // Check if we have contact with it
   if(unCond){
-    if(theFacade->theClusterMgr->getNodeInfo(nodeId).connected)
+    if(theFacade->theClusterMgr->getNodeInfo(nodeId).m_api_reg_conf)
       return 0;
   }
   else if (theFacade->get_node_alive(nodeId) == true)
@@ -1369,32 +1369,85 @@ MgmtSrvr::status(int nodeId, 
 }
 
 int 
-MgmtSrvr::setEventReportingLevelImpl(int nodeId, 
+MgmtSrvr::setEventReportingLevelImpl(int nodeId_arg, 
 				     const EventSubscribeReq& ll)
 {
   SignalSender ss(theFacade);
-  ss.lock();
-
-  SimpleSignal ssig;
-  EventSubscribeReq * dst = 
-    CAST_PTR(EventSubscribeReq, ssig.getDataPtrSend());
-  ssig.set(ss,TestOrd::TraceAPI, CMVMI, GSN_EVENT_SUBSCRIBE_REQ,
-	   EventSubscribeReq::SignalLength);
-  *dst = ll;
-
   NdbNodeBitmask nodes;
+  int retries = 30;
   nodes.clear();
-  Uint32 max = (nodeId == 0) ? (nodeId = 1, MAX_NDB_NODES) : nodeId;
-  for(; nodeId <= max; nodeId++)
+  while (1)
   {
-    if (nodeTypes[nodeId] != NODE_TYPE_DB)
-      continue;
-    if (okToSendTo(nodeId, true))
-      continue;
-    if (ss.sendSignal(nodeId, &ssig) == SEND_OK)
+    Uint32 nodeId, max;
+    ss.lock();
+    SimpleSignal ssig;
+    EventSubscribeReq * dst = 
+      CAST_PTR(EventSubscribeReq, ssig.getDataPtrSend());
+    ssig.set(ss,TestOrd::TraceAPI, CMVMI, GSN_EVENT_SUBSCRIBE_REQ,
+             EventSubscribeReq::SignalLength);
+    *dst = ll;
+
+    if (nodeId_arg == 0)
     {
-      nodes.set(nodeId);
+      // all nodes
+      nodeId = 1;
+      max = MAX_NDB_NODES;
+    }
+    else
+    {
+      // only one node
+      max = nodeId = nodeId_arg;
+    }
+    // first make sure nodes are sendable
+    for(; nodeId <= max; nodeId++)
+    {
+      if (nodeTypes[nodeId] != NODE_TYPE_DB)
+        continue;
+      if (okToSendTo(nodeId, true))
+      {
+        if (theFacade->theClusterMgr->getNodeInfo(nodeId).connected  == false)
+        {
+          // node not connected we can safely skip this one
+          continue;
+        }
+        // api_reg_conf not recevied yet, need to retry
+        break;
+      }
     }
+    if (nodeId <= max)
+    {
+      if (--retries)
+      {
+        ss.unlock();
+        NdbSleep_MilliSleep(100);  
+        continue;
+      }
+      return SEND_OR_RECEIVE_FAILED;
+    }
+
+    if (nodeId_arg == 0)
+    {
+      // all nodes
+      nodeId = 1;
+      max = MAX_NDB_NODES;
+    }
+    else
+    {
+      // only one node
+      max = nodeId = nodeId_arg;
+    }
+    // now send to all sendable nodes nodes
+    // note, lock is held, so states have not changed
+    for(; (Uint32) nodeId <= max; nodeId++)
+    {
+      if (nodeTypes[nodeId] != NODE_TYPE_DB)
+        continue;
+      if (theFacade->theClusterMgr->getNodeInfo(nodeId).connected  == false)
+        continue; // node is not connected, skip
+      if (ss.sendSignal(nodeId, &ssig) == SEND_OK)
+        nodes.set(nodeId);
+    }
+    break;
   }
 
   if (nodes.isclear())
@@ -1405,6 +1458,7 @@ MgmtSrvr::setEventReportingLevelImpl(int
   int error = 0;
   while (!nodes.isclear())
   {
+    Uint32 nodeId;
     SimpleSignal *signal = ss.waitFor();
     int gsn = signal->readSignalNumber();
     nodeId = refToNode(signal->header.theSendersBlockRef);

--- 1.29/storage/ndb/src/ndbapi/ClusterMgr.cpp	2007-01-26 21:39:27 +07:00
+++ 1.30/storage/ndb/src/ndbapi/ClusterMgr.cpp	2007-02-14 13:12:32 +07:00
@@ -246,7 +246,7 @@ ClusterMgr::showState(NodeId nodeId){
 ClusterMgr::Node::Node()
   : m_state(NodeState::SL_NOTHING) { 
   compatible = nfCompleteRep = true;
-  connected = defined = m_alive = false; 
+  connected = defined = m_alive = m_api_reg_conf = false; 
   m_state.m_connected_nodes.clear();
 }
 
@@ -320,6 +320,8 @@ ClusterMgr::execAPI_REGCONF(const Uint32
 					      node.m_info.m_version);
   }
 
+  node.m_api_reg_conf = true;
+
   Uint32 minVersion = apiRegConf->minDbVersion;
   if (node.m_info.m_version >= NDBD_255_NODES_VERSION)
   {
@@ -439,6 +441,7 @@ ClusterMgr::reportDisconnected(NodeId no
 
   noOfConnectedNodes--;
   theNodes[nodeId].connected = false;
+  theNodes[nodeId].m_api_reg_conf = false;
   theNodes[nodeId].m_state.m_connected_nodes.clear();
 
   reportNodeFailed(nodeId, true);

--- 1.14/storage/ndb/src/ndbapi/ClusterMgr.hpp	2007-02-08 04:06:43 +07:00
+++ 1.15/storage/ndb/src/ndbapi/ClusterMgr.hpp	2007-02-14 13:03:35 +07:00
@@ -64,6 +64,7 @@ public:
     bool compatible;    // Version is compatible
     bool nfCompleteRep; // NF Complete Rep has arrived
     bool m_alive;       // Node is alive
+    bool m_api_reg_conf;// API_REGCONF has arrived
     
     NodeInfo  m_info;
     NodeState m_state;

--- 1.9/storage/ndb/src/ndbapi/SignalSender.cpp	2006-10-30 19:16:59 +07:00
+++ 1.10/storage/ndb/src/ndbapi/SignalSender.cpp	2007-02-14 13:03:35 +07:00
@@ -141,6 +141,8 @@ SignalSender::getNoOfConnectedNodes() co
 
 SendStatus
 SignalSender::sendSignal(Uint16 nodeId, const SimpleSignal * s){
+  assert(getNodeInfo(nodeId).m_api_reg_conf == true ||
+         s->readSignalNumber() == GSN_API_REGREQ);
   return theFacade->theTransporterRegistry->prepareSend(&s->header,
 							1, // JBB
 							&s->theData[0],
Thread
bk commit into 5.1 tree (tomas:1.2111)tomas14 Feb