List:Commits« Previous MessageNext Message »
From:tomas Date:June 8 2006 3:27pm
Subject:bk commit into 4.1 tree (tomas:1.2478) BUG#20336
View as plain text  
Below is the list of changes that have just been committed into a local
4.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.2478 06/06/08 17:26:56 tomas@stripped +4 -0
  Bug #20336 CLUSTERLOG commands have no effect

  ndb/src/mgmsrv/Services.cpp
    1.41 06/06/08 17:26:51 tomas@stripped +7 -5
    Bug #20336 CLUSTERLOG commands have no effect
    - make sure to compute max every time for log level

  ndb/src/mgmsrv/MgmtSrvr.hpp
    1.34 06/06/08 17:26:51 tomas@stripped +0 -2
    Bug #20336 CLUSTERLOG commands have no effect

  ndb/src/mgmsrv/MgmtSrvr.cpp
    1.75 06/06/08 17:26:51 tomas@stripped +28 -27
    Bug #20336 CLUSTERLOG commands have no effect
    - make sure to actually send the update to ndb nodes, and wait for the reply

  ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
    1.21 06/06/08 17:26:51 tomas@stripped +3 -2
    Bug #20336 CLUSTERLOG commands have no effect
    - with signal sender the clock issuing the command and the revceiver of the events are not the same

# 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-4.1

--- 1.20/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp	2006-03-30 14:20:52 +02:00
+++ 1.21/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp	2006-06-08 17:26:51 +02:00
@@ -226,6 +226,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");
@@ -243,7 +244,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();
@@ -270,7 +271,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.74/ndb/src/mgmsrv/MgmtSrvr.cpp	2006-05-16 11:47:26 +02:00
+++ 1.75/ndb/src/mgmsrv/MgmtSrvr.cpp	2006-06-08 17:26:51 +02:00
@@ -1274,7 +1274,8 @@
 MgmtSrvr::setEventReportingLevelImpl(int nodeId, 
 				     const EventSubscribeReq& ll)
 {
-  INIT_SIGNAL_SENDER(ss,nodeId);
+  SignalSender ss(theFacade);
+  ss.lock();
 
   SimpleSignal ssig;
   EventSubscribeReq * dst = 
@@ -1283,41 +1284,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;
 }
 
@@ -1335,19 +1349,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.33/ndb/src/mgmsrv/MgmtSrvr.hpp	2005-09-22 13:55:08 +02:00
+++ 1.34/ndb/src/mgmsrv/MgmtSrvr.hpp	2006-06-08 17:26:51 +02:00
@@ -472,8 +472,6 @@
 private:
   //**************************************************************************
 
-  int send(SignalSender &ss, SimpleSignal &ssig, Uint32 node, Uint32 node_type);
-
   int sendSTOP_REQ(NodeId nodeId,
 		   NodeBitmask &stoppedNodes,
 		   Uint32 singleUserNodeId,

--- 1.40/ndb/src/mgmsrv/Services.cpp	2006-04-26 15:12:30 +02:00
+++ 1.41/ndb/src/mgmsrv/Services.cpp	2006-06-08 17:26:51 +02:00
@@ -763,9 +763,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);
@@ -1248,8 +1247,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 4.1 tree (tomas:1.2478) BUG#20336tomas8 Jun