mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 13:32:33 +01:00
Merge poseidon.ndb.mysql.com:/home/tomas/mysql-5.0
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.0-main
This commit is contained in:
commit
8d8081ff3d
2 changed files with 40 additions and 32 deletions
|
@ -122,41 +122,50 @@ MgmtSrvr::logLevelThreadRun()
|
|||
/**
|
||||
* 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();
|
||||
|
@ -1521,7 +1530,7 @@ MgmtSrvr::setEventReportingLevelImpl(int nodeId,
|
|||
{
|
||||
if (nodeTypes[nodeId] != NODE_TYPE_DB)
|
||||
continue;
|
||||
if (okToSendTo(nodeId, false))
|
||||
if (okToSendTo(nodeId, true))
|
||||
continue;
|
||||
if (ss.sendSignal(nodeId, &ssig) == SEND_OK)
|
||||
{
|
||||
|
|
|
@ -1322,13 +1322,12 @@ Ndb_mgmd_event_service::update_max_log_level(const LogLevel &log_level)
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue