List:Commits« Previous MessageNext Message »
From:tomas Date:June 12 2006 11:07am
Subject:bk commit into 4.1 tree (tomas:1.2479) 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.2479 06/06/12 13:06:56 tomas@stripped +2 -0
  Bug #20336 CLUSTERLOG commands have no effect
  - always calculate max log level on node start
  - send event subscribe uncond

  ndb/src/mgmsrv/Services.cpp
    1.42 06/06/12 13:06:52 tomas@stripped +6 -7
    Bug #20336 CLUSTERLOG commands have no effect
    - always send log level update
    

  ndb/src/mgmsrv/MgmtSrvr.cpp
    1.76 06/06/12 13:06:52 tomas@stripped +34 -25
    Bug #20336 CLUSTERLOG commands have no effect
    - always calculate max log level on node start
    - send event subscribe uncond

# 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.75/ndb/src/mgmsrv/MgmtSrvr.cpp	2006-06-08 17:26:51 +02:00
+++ 1.76/ndb/src/mgmsrv/MgmtSrvr.cpp	2006-06-12 13:06:52 +02:00
@@ -119,41 +119,50 @@
     /**
      * Handle started nodes
      */
-    EventSubscribeReq req;
-    req = m_event_listner[0].m_logLevel;
-    req.blockRef = _ownReference;
-
-    SetLogLevelOrd ord;
-    
     m_started_nodes.lock();
-    while(m_started_nodes.size() > 0){
-      Uint32 node = m_started_nodes[0];
-      m_started_nodes.erase(0, false);
-      m_started_nodes.unlock();
+    if (m_started_nodes.size() > 0)
+    {
+      // calculate max log level
+      EventSubscribeReq req;
+      {
+        LogLevel tmp;
+        m_event_listner.lock();
+        for(int i = m_event_listner.m_clients.size() - 1; i >= 0; i--)
+          tmp.set_max(m_event_listner[i].m_logLevel);
+        m_event_listner.unlock();
+        req = tmp;
+      }
+      req.blockRef = _ownReference;
+      while (m_started_nodes.size() > 0)
+      {
+        Uint32 node = m_started_nodes[0];
+        m_started_nodes.erase(0, false);
+        m_started_nodes.unlock();
 
-      setEventReportingLevelImpl(node, req);
-      
-      ord = m_nodeLogLevel[node];
-      setNodeLogLevelImpl(node, ord);
-      
-      m_started_nodes.lock();
-    }				 
+        setEventReportingLevelImpl(node, req);
+
+        SetLogLevelOrd ord;
+        ord = m_nodeLogLevel[node];
+        setNodeLogLevelImpl(node, ord);
+
+        m_started_nodes.lock();
+      }
+    }
     m_started_nodes.unlock();
     
     m_log_level_requests.lock();
-    while(m_log_level_requests.size() > 0){
-      req = m_log_level_requests[0];
+    while (m_log_level_requests.size() > 0)
+    {
+      EventSubscribeReq req = m_log_level_requests[0];
       m_log_level_requests.erase(0, false);
       m_log_level_requests.unlock();
-      
-      LogLevel tmp;
-      tmp = req;
-      
+
       if(req.blockRef == 0){
 	req.blockRef = _ownReference;
 	setEventReportingLevelImpl(0, req);
       } else {
-	ord = req;
+        SetLogLevelOrd ord;
+        ord = req;
 	setNodeLogLevelImpl(req.blockRef, ord);
       }
       m_log_level_requests.lock();
@@ -1291,7 +1300,7 @@
   {
     if (nodeTypes[nodeId] != NODE_TYPE_DB)
       continue;
-    if (okToSendTo(nodeId, false))
+    if (okToSendTo(nodeId, true))
       continue;
     if (ss.sendSignal(nodeId, &ssig) == SEND_OK)
     {

--- 1.41/ndb/src/mgmsrv/Services.cpp	2006-06-08 17:26:51 +02:00
+++ 1.42/ndb/src/mgmsrv/Services.cpp	2006-06-12 13:06:52 +02:00
@@ -1258,13 +1258,12 @@
 void
 Ndb_mgmd_event_service::update_log_level(const LogLevel &tmp)
 {
-  if(!(tmp == m_logLevel)){
-    m_logLevel = tmp;
-    EventSubscribeReq req;
-    req = tmp;
-    req.blockRef = 0;
-    m_mgmsrv->m_log_level_requests.push_back(req);
-  }
+  m_logLevel = tmp;
+  EventSubscribeReq req;
+  req = tmp;
+  // send update to all nodes
+  req.blockRef = 0;
+  m_mgmsrv->m_log_level_requests.push_back(req);
 }
 
 void
Thread
bk commit into 4.1 tree (tomas:1.2479) BUG#20336tomas12 Jun