List:Commits« Previous MessageNext Message »
From:tomas Date:June 12 2006 11:17am
Subject:bk commit into 5.1 tree (tomas:1.2026) BUG#20336
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.2026 06/06/12 13:16:59 tomas@stripped +4 -0
  Bug #20336 CLUSTERLOG commands have no effect

  storage/ndb/src/mgmsrv/Services.cpp
    1.60 06/06/12 13:16:50 tomas@stripped +7 -5
    Bug #20336 CLUSTERLOG commands have no effect

  storage/ndb/src/mgmsrv/MgmtSrvr.hpp
    1.43 06/06/12 13:16:50 tomas@stripped +0 -2
    Bug #20336 CLUSTERLOG commands have no effect

  storage/ndb/src/mgmsrv/MgmtSrvr.cpp
    1.92 06/06/12 13:16:50 tomas@stripped +28 -27
    Bug #20336 CLUSTERLOG commands have no effect

  storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
    1.27 06/06/12 13:16:50 tomas@stripped +3 -2
    Bug #20336 CLUSTERLOG commands have no effect

# 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/wl2325-alcatel

--- 1.26/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp	2006-04-05 16:05:35 +02:00
+++ 1.27/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp	2006-06-12 13:16:50 +02:00
@@ -233,6 +233,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");
@@ -250,7 +251,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();
@@ -277,7 +278,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.91/storage/ndb/src/mgmsrv/MgmtSrvr.cpp	2006-05-22 15:58:17 +02:00
+++ 1.92/storage/ndb/src/mgmsrv/MgmtSrvr.cpp	2006-06-12 13:16:50 +02:00
@@ -1357,7 +1357,8 @@
 MgmtSrvr::setEventReportingLevelImpl(int nodeId, 
 				     const EventSubscribeReq& ll)
 {
-  INIT_SIGNAL_SENDER(ss,nodeId);
+  SignalSender ss(theFacade);
+  ss.lock();
 
   SimpleSignal ssig;
   EventSubscribeReq * dst = 
@@ -1366,41 +1367,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;
 }
 
@@ -1418,19 +1432,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.42/storage/ndb/src/mgmsrv/MgmtSrvr.hpp	2006-04-26 15:58:17 +02:00
+++ 1.43/storage/ndb/src/mgmsrv/MgmtSrvr.hpp	2006-06-12 13:16:50 +02:00
@@ -483,8 +483,6 @@
 private:
   //**************************************************************************
 
-  int send(SignalSender &ss, SimpleSignal &ssig, Uint32 node, Uint32 node_type);
-
   int sendSTOP_REQ(const Vector<NodeId> &node_ids,
 		   NodeBitmask &stoppedNodes,
 		   Uint32 singleUserNodeId,

--- 1.59/storage/ndb/src/mgmsrv/Services.cpp	2006-05-22 16:03:28 +02:00
+++ 1.60/storage/ndb/src/mgmsrv/Services.cpp	2006-06-12 13:16:50 +02:00
@@ -801,9 +801,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);
@@ -1313,8 +1312,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.1 tree (tomas:1.2026) BUG#20336tomas12 Jun