MySQL Lists are EOL. Please join:

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

  storage/ndb/src/mgmsrv/Services.cpp
    1.61 06/06/12 13:25:21 tomas@stripped +6 -7
    Bug #20336 CLUSTERLOG commands have no effect

  storage/ndb/src/mgmsrv/MgmtSrvr.cpp
    1.93 06/06/12 13:25:21 tomas@stripped +34 -25
    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.92/storage/ndb/src/mgmsrv/MgmtSrvr.cpp	2006-06-12 13:16:50 +02:00
+++ 1.93/storage/ndb/src/mgmsrv/MgmtSrvr.cpp	2006-06-12 13:25:21 +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();
@@ -1374,7 +1383,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.60/storage/ndb/src/mgmsrv/Services.cpp	2006-06-12 13:16:50 +02:00
+++ 1.61/storage/ndb/src/mgmsrv/Services.cpp	2006-06-12 13:25:21 +02:00
@@ -1323,13 +1323,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 5.1 tree (tomas:1.2027) BUG#20336tomas12 Jun