List:Commits« Previous MessageNext Message »
From:tomas Date:June 8 2006 3:55pm
Subject:bk commit into 5.0 tree (tomas:1.2128)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 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.2128 06/06/08 17:55:44 tomas@stripped +4 -0
  Merge poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
  into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.0

  ndb/src/mgmsrv/Services.cpp
    1.65 06/06/08 17:55:37 tomas@stripped +0 -0
    Auto merged

  ndb/src/mgmsrv/MgmtSrvr.hpp
    1.44 06/06/08 17:55:37 tomas@stripped +0 -0
    Auto merged

  ndb/src/mgmsrv/MgmtSrvr.cpp
    1.100 06/06/08 17:55:37 tomas@stripped +0 -0
    Auto merged

  ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
    1.25 06/06/08 17:55:37 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.ndb.mysql.com
# Root:	/home/tomas/mysql-5.0/RESYNC

--- 1.24/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp	2006-04-05 11:21:34 +02:00
+++ 1.25/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp	2006-06-08 17:55:37 +02:00
@@ -234,6 +234,7 @@
 void
 Cmvmi::execEVENT_SUBSCRIBE_REQ(Signal * signal){
   EventSubscribeReq * subReq = (EventSubscribeReq *)&signal->theData[0];
+  Uint32 senderRef = signal->getSendersBlockRef();
   SubscriberPtr ptr;
   jamEntry();
   DBUG_ENTER("Cmvmi::execEVENT_SUBSCRIBE_REQ");
@@ -251,7 +252,7 @@
      * Create a new one
      */
     if(subscribers.seize(ptr) == false){
-      sendSignal(subReq->blockRef, GSN_EVENT_SUBSCRIBE_REF, signal, 1, JBB);
+      sendSignal(senderRef, GSN_EVENT_SUBSCRIBE_REF, signal, 1, JBB);
       return;
     }
     ptr.p->logLevel.clear();
@@ -278,7 +279,7 @@
   }
   
   signal->theData[0] = ptr.i;
-  sendSignal(ptr.p->blockRef, GSN_EVENT_SUBSCRIBE_CONF, signal, 1, JBB);
+  sendSignal(senderRef, GSN_EVENT_SUBSCRIBE_CONF, signal, 1, JBB);
   DBUG_VOID_RETURN;
 }
 

--- 1.99/ndb/src/mgmsrv/MgmtSrvr.cpp	2006-05-16 11:49:54 +02:00
+++ 1.100/ndb/src/mgmsrv/MgmtSrvr.cpp	2006-06-08 17:55:37 +02:00
@@ -1504,7 +1504,8 @@
 MgmtSrvr::setEventReportingLevelImpl(int nodeId, 
 				     const EventSubscribeReq& ll)
 {
-  INIT_SIGNAL_SENDER(ss,nodeId);
+  SignalSender ss(theFacade);
+  ss.lock();
 
   SimpleSignal ssig;
   EventSubscribeReq * dst = 
@@ -1513,41 +1514,54 @@
 	   EventSubscribeReq::SignalLength);
   *dst = ll;
 
-  send(ss,ssig,nodeId,NODE_TYPE_DB);
+  NodeBitmask nodes;
+  nodes.clear();
+  Uint32 max = (nodeId == 0) ? (nodeId = 1, MAX_NDB_NODES) : nodeId;
+  for(; nodeId <= max; nodeId++)
+  {
+    if (nodeTypes[nodeId] != NODE_TYPE_DB)
+      continue;
+    if (okToSendTo(nodeId, false))
+      continue;
+    if (ss.sendSignal(nodeId, &ssig) == SEND_OK)
+    {
+      nodes.set(nodeId);
+    }
+  }
 
-#if 0
-  while (1)
+  int error = 0;
+  while (!nodes.isclear())
   {
     SimpleSignal *signal = ss.waitFor();
     int gsn = signal->readSignalNumber();
-    switch (gsn) { 
+    nodeId = refToNode(signal->header.theSendersBlockRef);
+    switch (gsn) {
     case GSN_EVENT_SUBSCRIBE_CONF:{
+      nodes.clear(nodeId);
       break;
     }
     case GSN_EVENT_SUBSCRIBE_REF:{
-      return SEND_OR_RECEIVE_FAILED;
+      nodes.clear(nodeId);
+      error = 1;
+      break;
     }
     case GSN_NF_COMPLETEREP:{
       const NFCompleteRep * const rep =
 	CAST_CONSTPTR(NFCompleteRep, signal->getDataPtr());
-      if (rep->failedNodeId == nodeId)
-	return SEND_OR_RECEIVE_FAILED;
+      nodes.clear(rep->failedNodeId);
       break;
     }
     case GSN_NODE_FAILREP:{
-      const NodeFailRep * const rep =
-	CAST_CONSTPTR(NodeFailRep, signal->getDataPtr());
-      if (NodeBitmask::get(rep->theNodes,nodeId))
-	return SEND_OR_RECEIVE_FAILED;
+      // ignore, NF_COMPLETEREP will arrive later
       break;
     }
     default:
       report_unknown_signal(signal);
       return SEND_OR_RECEIVE_FAILED;
     }
-
   }
-#endif
+  if (error)
+    return SEND_OR_RECEIVE_FAILED;
   return 0;
 }
 
@@ -1565,19 +1579,6 @@
   *dst = ll;
   
   return ss.sendSignal(nodeId, &ssig) == SEND_OK ? 0 : SEND_OR_RECEIVE_FAILED;
-}
-
-int
-MgmtSrvr::send(SignalSender &ss, SimpleSignal &ssig, Uint32 node, Uint32 node_type){
-  Uint32 max = (node == 0) ? MAX_NODES : node + 1;
-  
-  for(; node < max; node++){
-    while(nodeTypes[node] != (int)node_type && node < max) node++;
-    if(nodeTypes[node] != (int)node_type)
-      break;
-    ss.sendSignal(node, &ssig);
-  }
-  return 0;
 }
 
 //****************************************************************************

--- 1.43/ndb/src/mgmsrv/MgmtSrvr.hpp	2006-04-26 15:55:24 +02:00
+++ 1.44/ndb/src/mgmsrv/MgmtSrvr.hpp	2006-06-08 17:55:37 +02:00
@@ -491,8 +491,6 @@
 private:
   //**************************************************************************
 
-  int send(SignalSender &ss, SimpleSignal &ssig, Uint32 node, Uint32 node_type);
-
   int sendStopMgmd(NodeId nodeId,
                    bool abort,
                    bool stop,

--- 1.64/ndb/src/mgmsrv/Services.cpp	2006-05-08 07:56:24 +02:00
+++ 1.65/ndb/src/mgmsrv/Services.cpp	2006-06-08 17:55:37 +02:00
@@ -822,9 +822,8 @@
   m_mgmsrv.m_event_listner.unlock();
 
   {
-    LogLevel ll;
-    ll.setLogLevel(category,level);
-    m_mgmsrv.m_event_listner.update_max_log_level(ll);
+    LogLevel tmp;
+    m_mgmsrv.m_event_listner.update_max_log_level(tmp);
   }
 
   m_output->println(reply);
@@ -1311,8 +1310,11 @@
 void
 Ndb_mgmd_event_service::update_max_log_level(const LogLevel &log_level)
 {
-  LogLevel tmp= m_logLevel;
-  tmp.set_max(log_level);
+  LogLevel tmp = log_level;
+  m_clients.lock();
+  for(int i = m_clients.size() - 1; i >= 0; i--)
+    tmp.set_max(m_clients[i].m_logLevel);
+  m_clients.unlock();
   update_log_level(tmp);
 }
 
Thread
bk commit into 5.0 tree (tomas:1.2128)tomas8 Jun