Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
02dab285
Commit
02dab285
authored
Dec 08, 2004
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-clean
parents
3519e554
c2c61833
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
129 additions
and
88 deletions
+129
-88
mysql-test/ndb/ndbcluster.sh
mysql-test/ndb/ndbcluster.sh
+1
-2
ndb/include/debugger/EventLogger.hpp
ndb/include/debugger/EventLogger.hpp
+5
-0
ndb/include/kernel/LogLevel.hpp
ndb/include/kernel/LogLevel.hpp
+8
-4
ndb/src/common/debugger/EventLogger.cpp
ndb/src/common/debugger/EventLogger.cpp
+25
-10
ndb/src/common/portlib/NdbTCP.cpp
ndb/src/common/portlib/NdbTCP.cpp
+6
-6
ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
+8
-15
ndb/src/mgmapi/mgmapi.cpp
ndb/src/mgmapi/mgmapi.cpp
+5
-2
ndb/src/mgmsrv/MgmtSrvr.cpp
ndb/src/mgmsrv/MgmtSrvr.cpp
+18
-16
ndb/src/mgmsrv/MgmtSrvr.hpp
ndb/src/mgmsrv/MgmtSrvr.hpp
+11
-8
ndb/src/mgmsrv/Services.cpp
ndb/src/mgmsrv/Services.cpp
+38
-25
ndb/src/ndbapi/TransporterFacade.cpp
ndb/src/ndbapi/TransporterFacade.cpp
+4
-0
No files found.
mysql-test/ndb/ndbcluster.sh
View file @
02dab285
...
...
@@ -67,8 +67,7 @@ while test $# -gt 0; do
initial_ndb
=
1
;;
--debug
*
)
f
=
`
echo
"
$1
"
|
sed
-e
"s;--debug=;;"
`
flags_ndb
=
"
$flags_ndb
$f
"
flags_ndb
=
"
$flags_ndb
$1
"
;;
--status
)
status_ndb
=
1
...
...
ndb/include/debugger/EventLogger.hpp
View file @
02dab285
...
...
@@ -48,6 +48,11 @@ public:
static
const
EventRepLogLevelMatrix
matrix
[];
static
const
Uint32
matrixSize
;
static
int
EventLoggerBase
::
event_lookup
(
int
eventType
,
LogLevel
::
EventCategory
&
cat
,
Uint32
&
threshold
,
Logger
::
LoggerLevel
&
severity
);
};
/**
...
...
ndb/include/kernel/LogLevel.hpp
View file @
02dab285
...
...
@@ -73,7 +73,7 @@ public:
/**
* Note level is valid as 0-15
*/
void
setLogLevel
(
EventCategory
ec
,
Uint32
level
=
7
);
int
setLogLevel
(
EventCategory
ec
,
Uint32
level
=
7
);
/**
* Get the loglevel (0-15) for a category
...
...
@@ -119,10 +119,14 @@ LogLevel::clear(){
}
inline
void
int
LogLevel
::
setLogLevel
(
EventCategory
ec
,
Uint32
level
){
assert
(
ec
>=
0
&&
(
Uint32
)
ec
<
LOGLEVEL_CATEGORIES
);
logLevelData
[
ec
]
=
(
Uint8
)
level
;
if
(
ec
>=
0
&&
(
Uint32
)
ec
<
LOGLEVEL_CATEGORIES
)
{
logLevelData
[
ec
]
=
(
Uint8
)
level
;
return
0
;
}
return
1
;
}
inline
...
...
ndb/src/common/debugger/EventLogger.cpp
View file @
02dab285
...
...
@@ -1342,27 +1342,41 @@ operator<<(NdbOut& out, const LogLevel & ll)
return
out
;
}
void
EventLogger
::
log
(
int
eventType
,
const
Uint32
*
theData
,
NodeId
nodeId
,
const
LogLevel
*
ll
)
int
EventLoggerBase
::
event_lookup
(
int
eventType
,
LogLevel
::
EventCategory
&
cat
,
Uint32
&
threshold
,
Logger
::
LoggerLevel
&
severity
)
{
Uint32
threshold
=
0
;
Logger
::
LoggerLevel
severity
=
Logger
::
LL_WARNING
;
LogLevel
::
EventCategory
cat
=
LogLevel
::
llInvalid
;
for
(
unsigned
i
=
0
;
i
<
EventLoggerBase
::
matrixSize
;
i
++
){
if
(
EventLoggerBase
::
matrix
[
i
].
eventType
==
eventType
){
cat
=
EventLoggerBase
::
matrix
[
i
].
eventCategory
;
threshold
=
EventLoggerBase
::
matrix
[
i
].
threshold
;
severity
=
EventLoggerBase
::
matrix
[
i
].
severity
;
break
;
return
0
;
}
}
return
1
;
}
void
EventLogger
::
log
(
int
eventType
,
const
Uint32
*
theData
,
NodeId
nodeId
,
const
LogLevel
*
ll
)
{
Uint32
threshold
=
0
;
Logger
::
LoggerLevel
severity
=
Logger
::
LL_WARNING
;
LogLevel
::
EventCategory
cat
=
LogLevel
::
llInvalid
;
DBUG_ENTER
(
"EventLogger::log"
);
DBUG_PRINT
(
"enter"
,(
"eventType=%d, nodeid=%d"
,
eventType
,
nodeId
));
if
(
cat
==
LogLevel
::
llInvalid
)
return
;
if
(
EventLoggerBase
::
event_lookup
(
eventType
,
cat
,
threshold
,
severity
)
)
DBUG_VOID_RETURN
;
Uint32
set
=
ll
?
ll
->
getLogLevel
(
cat
)
:
m_logLevel
.
getLogLevel
(
cat
);
DBUG_PRINT
(
"info"
,(
"threshold=%d, set=%d"
,
threshold
,
set
));
if
(
ll
)
DBUG_PRINT
(
"info"
,(
"m_logLevel.getLogLevel=%d"
,
m_logLevel
.
getLogLevel
(
cat
)));
if
(
threshold
<=
set
){
switch
(
severity
){
case
Logger
:
:
LL_ALERT
:
...
...
@@ -1401,6 +1415,7 @@ EventLogger::log(int eventType, const Uint32* theData, NodeId nodeId,
break
;
}
}
// if (..
DBUG_VOID_RETURN
;
}
int
...
...
ndb/src/common/portlib/NdbTCP.cpp
View file @
02dab285
...
...
@@ -22,7 +22,7 @@
extern
"C"
int
Ndb_getInAddr
(
struct
in_addr
*
dst
,
const
char
*
address
)
{
DBUG_ENTER
(
"Ndb_getInAddr"
);
//
DBUG_ENTER("Ndb_getInAddr");
{
int
tmp_errno
;
struct
hostent
tmp_hostent
,
*
hp
;
...
...
@@ -33,7 +33,7 @@ Ndb_getInAddr(struct in_addr * dst, const char *address) {
{
memcpy
(
dst
,
hp
->
h_addr
,
min
(
sizeof
(
*
dst
),
(
size_t
)
hp
->
h_length
));
my_gethostbyname_r_free
();
DBUG_RETURN
(
0
);
return
0
;
//
DBUG_RETURN(0);
}
my_gethostbyname_r_free
();
}
...
...
@@ -47,11 +47,11 @@ Ndb_getInAddr(struct in_addr * dst, const char *address) {
#endif
)
{
DBUG_RETURN
(
0
);
return
0
;
//
DBUG_RETURN(0);
}
DBUG_PRINT
(
"error"
,(
"inet_addr(%s) - %d - %s"
,
address
,
errno
,
strerror
(
errno
)));
DBUG_RETURN
(
-
1
);
//
DBUG_PRINT("error",("inet_addr(%s) - %d - %s",
//
address, errno, strerror(errno)));
return
-
1
;
//
DBUG_RETURN(-1);
}
#if 0
...
...
ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
View file @
02dab285
...
...
@@ -193,21 +193,11 @@ void Cmvmi::execEVENT_REP(Signal* signal)
/**
* If entry is not found
*/
Uint32
threshold
=
16
;
LogLevel
::
EventCategory
eventCategory
=
(
LogLevel
::
EventCategory
)
0
;
for
(
unsigned
int
i
=
0
;
i
<
EventLoggerBase
::
matrixSize
;
i
++
){
if
(
EventLoggerBase
::
matrix
[
i
].
eventType
==
eventType
){
eventCategory
=
EventLoggerBase
::
matrix
[
i
].
eventCategory
;
threshold
=
EventLoggerBase
::
matrix
[
i
].
threshold
;
break
;
}
}
if
(
threshold
>
15
){
// No entry found in matrix (or event that should never be printed)
Uint32
threshold
;
LogLevel
::
EventCategory
eventCategory
;
Logger
::
LoggerLevel
severity
;
if
(
EventLoggerBase
::
event_lookup
(
eventType
,
eventCategory
,
threshold
,
severity
))
return
;
}
SubscriberPtr
ptr
;
for
(
subscribers
.
first
(
ptr
);
ptr
.
i
!=
RNIL
;
subscribers
.
next
(
ptr
)){
...
...
@@ -225,14 +215,15 @@ void Cmvmi::execEVENT_REP(Signal* signal)
// Print the event info
g_eventLogger
.
log
(
eventReport
->
getEventType
(),
signal
->
theData
);
return
;
}
//execEVENT_REP()
void
Cmvmi
::
execEVENT_SUBSCRIBE_REQ
(
Signal
*
signal
){
EventSubscribeReq
*
subReq
=
(
EventSubscribeReq
*
)
&
signal
->
theData
[
0
];
SubscriberPtr
ptr
;
jamEntry
();
DBUG_ENTER
(
"Cmvmi::execEVENT_SUBSCRIBE_REQ"
);
/**
* Search for subcription
...
...
@@ -269,11 +260,13 @@ Cmvmi::execEVENT_SUBSCRIBE_REQ(Signal * signal){
category
=
(
LogLevel
::
EventCategory
)(
subReq
->
theData
[
i
]
>>
16
);
level
=
subReq
->
theData
[
i
]
&
0xFFFF
;
ptr
.
p
->
logLevel
.
setLogLevel
(
category
,
level
);
DBUG_PRINT
(
"info"
,(
"entry %d: level=%d, category= %d"
,
i
,
level
,
category
));
}
}
signal
->
theData
[
0
]
=
ptr
.
i
;
sendSignal
(
ptr
.
p
->
blockRef
,
GSN_EVENT_SUBSCRIBE_CONF
,
signal
,
1
,
JBB
);
DBUG_VOID_RETURN
;
}
void
...
...
ndb/src/mgmapi/mgmapi.cpp
View file @
02dab285
...
...
@@ -1102,15 +1102,18 @@ ndb_mgm_set_loglevel_clusterlog(NdbMgmHandle handle, int nodeId,
"set cluster loglevel"
,
&
args
);
CHECK_REPLY
(
reply
,
-
1
);
DBUG_ENTER
(
"ndb_mgm_set_loglevel_clusterlog"
);
DBUG_PRINT
(
"enter"
,(
"node=%d, category=%d, level=%d"
,
nodeId
,
cat
,
level
));
BaseString
result
;
reply
->
get
(
"result"
,
result
);
if
(
strcmp
(
result
.
c_str
(),
"Ok"
)
!=
0
)
{
SET_ERROR
(
handle
,
EINVAL
,
result
.
c_str
());
delete
reply
;
return
-
1
;
DBUG_RETURN
(
-
1
)
;
}
delete
reply
;
return
0
;
DBUG_RETURN
(
0
)
;
}
extern
"C"
...
...
ndb/src/mgmsrv/MgmtSrvr.cpp
View file @
02dab285
...
...
@@ -153,7 +153,7 @@ MgmtSrvr::logLevelThreadRun()
* Handle started nodes
*/
EventSubscribeReq
req
;
req
=
m_
statisticsListner
.
m_clients
[
0
].
m_logLevel
;
req
=
m_
event_listner
[
0
].
m_logLevel
;
req
.
blockRef
=
_ownReference
;
SetLogLevelOrd
ord
;
...
...
@@ -409,7 +409,7 @@ MgmtSrvr::MgmtSrvr(SocketServer *socket_server,
_ownReference
(
0
),
theSignalIdleList
(
NULL
),
theWaitState
(
WAIT_SUBSCRIBE_CONF
),
m_
statisticsL
istner
(
this
)
m_
event_l
istner
(
this
)
{
DBUG_ENTER
(
"MgmtSrvr::MgmtSrvr"
);
...
...
@@ -547,16 +547,18 @@ MgmtSrvr::MgmtSrvr(SocketServer *socket_server,
}
}
// Setup clusterlog as client[0] in m_event_listner
{
MgmStatService
::
StatL
istener
se
;
Ndb_mgmd_event_service
::
Event_l
istener
se
;
se
.
m_socket
=
-
1
;
for
(
size_t
t
=
0
;
t
<
LogLevel
::
LOGLEVEL_CATEGORIES
;
t
++
){
se
.
m_logLevel
.
setLogLevel
((
LogLevel
::
EventCategory
)
t
,
7
);
}
se
.
m_logLevel
.
setLogLevel
(
LogLevel
::
llError
,
15
);
se
.
m_logLevel
.
setLogLevel
(
LogLevel
::
llConnection
,
8
);
se
.
m_logLevel
.
setLogLevel
(
LogLevel
::
llBackup
,
15
);
m_
statisticsL
istner
.
m_clients
.
push_back
(
se
);
m_
statisticsL
istner
.
m_logLevel
=
se
.
m_logLevel
;
m_
event_l
istner
.
m_clients
.
push_back
(
se
);
m_
event_l
istner
.
m_logLevel
=
se
.
m_logLevel
;
}
DBUG_VOID_RETURN
;
...
...
@@ -2071,21 +2073,18 @@ MgmtSrvr::handleStopReply(NodeId nodeId, Uint32 errCode)
void
MgmtSrvr
::
handleStatus
(
NodeId
nodeId
,
bool
alive
)
{
DBUG_ENTER
(
"MgmtSrvr::handleStatus"
);
Uint32
theData
[
25
];
theData
[
1
]
=
nodeId
;
if
(
alive
)
{
m_started_nodes
.
push_back
(
nodeId
);
Uint32
theData
[
25
];
theData
[
0
]
=
EventReport
::
Connected
;
theData
[
1
]
=
nodeId
;
eventReport
(
_ownNodeId
,
theData
);
}
else
{
handleStopReply
(
nodeId
,
0
);
Uint32
theData
[
25
];
theData
[
0
]
=
EventReport
::
Disconnected
;
theData
[
1
]
=
nodeId
;
eventReport
(
_ownNodeId
,
theData
);
}
eventReport
(
_ownNodeId
,
theData
);
DBUG_VOID_RETURN
;
}
//****************************************************************************
...
...
@@ -2106,8 +2105,11 @@ void
MgmtSrvr
::
nodeStatusNotification
(
void
*
mgmSrv
,
Uint32
nodeId
,
bool
alive
,
bool
nfComplete
)
{
DBUG_ENTER
(
"MgmtSrvr::nodeStatusNotification"
);
DBUG_PRINT
(
"enter"
,(
"nodeid= %d, alive= %d, nfComplete= %d"
,
nodeId
,
alive
,
nfComplete
));
if
(
!
(
!
alive
&&
nfComplete
))
((
MgmtSrvr
*
)
mgmSrv
)
->
handleStatus
(
nodeId
,
alive
);
DBUG_VOID_RETURN
;
}
enum
ndb_mgm_node_type
...
...
@@ -2387,8 +2389,8 @@ MgmtSrvr::eventReport(NodeId nodeId, const Uint32 * theData)
EventReport
::
EventType
type
=
eventReport
->
getEventType
();
// Log event
g_EventLogger
.
log
(
type
,
theData
,
nodeId
,
&
m_
statisticsListner
.
m_clients
[
0
].
m_logLevel
);
m_
statisticsL
istner
.
log
(
type
,
theData
,
nodeId
);
&
m_
event_listner
[
0
].
m_logLevel
);
m_
event_l
istner
.
log
(
type
,
theData
,
nodeId
);
}
/***************************************************************************
...
...
@@ -2741,5 +2743,5 @@ template bool SignalQueue::waitFor<SigMatch>(Vector<SigMatch>&, SigMatch*&, NdbA
#endif
template
class
MutexVector
<
unsigned
short
>;
template
class
MutexVector
<
MgmStatService
::
StatL
istener
>;
template
class
MutexVector
<
Ndb_mgmd_event_service
::
Event_l
istener
>;
template
class
MutexVector
<
EventSubscribeReq
>;
ndb/src/mgmsrv/MgmtSrvr.hpp
View file @
02dab285
...
...
@@ -43,27 +43,30 @@ class Config;
class
SetLogLevelOrd
;
class
SocketServer
;
class
MgmStatS
ervice
:
public
EventLoggerBase
class
Ndb_mgmd_event_s
ervice
:
public
EventLoggerBase
{
friend
class
MgmtSrvr
;
public:
struct
StatL
istener
:
public
EventLoggerBase
{
struct
Event_l
istener
:
public
EventLoggerBase
{
NDB_SOCKET_TYPE
m_socket
;
};
private:
class
MgmtSrvr
*
m_mgmsrv
;
MutexVector
<
StatL
istener
>
m_clients
;
MutexVector
<
Event_l
istener
>
m_clients
;
public:
MgmStatS
ervice
(
class
MgmtSrvr
*
m
)
:
m_clients
(
5
)
{
Ndb_mgmd_event_s
ervice
(
class
MgmtSrvr
*
m
)
:
m_clients
(
5
)
{
m_mgmsrv
=
m
;
}
void
add_listener
(
const
StatL
istener
&
);
void
add_listener
(
const
Event_l
istener
&
);
void
log
(
int
eventType
,
const
Uint32
*
theData
,
NodeId
nodeId
);
void
stopSessions
();
void
stop_sessions
();
Event_listener
&
operator
[](
unsigned
i
)
{
return
m_clients
[
i
];
}
const
Event_listener
&
operator
[](
unsigned
i
)
const
{
return
m_clients
[
i
];
}
};
/**
...
...
@@ -732,8 +735,8 @@ private:
LogLevel
m_nodeLogLevel
[
MAX_NODES
];
enum
ndb_mgm_node_type
nodeTypes
[
MAX_NODES
];
friend
class
MgmApiSession
;
friend
class
MgmStatS
ervice
;
MgmStatService
m_statisticsL
istner
;
friend
class
Ndb_mgmd_event_s
ervice
;
Ndb_mgmd_event_service
m_event_l
istner
;
/**
* Handles the thread wich upon a 'Node is started' event will
...
...
ndb/src/mgmsrv/Services.cpp
View file @
02dab285
...
...
@@ -208,12 +208,12 @@ ParserRow<MgmApiSession> commands[] = {
MGM_CMD
(
"set loglevel"
,
&
MgmApiSession
::
setLogLevel
,
""
),
MGM_ARG
(
"node"
,
Int
,
Mandatory
,
"Node"
),
MGM_ARG
(
"category"
,
String
,
Mandatory
,
"Event category"
),
MGM_ARG
(
"category"
,
Int
,
Mandatory
,
"Event category"
),
MGM_ARG
(
"level"
,
Int
,
Mandatory
,
"Log level (0-15)"
),
MGM_CMD
(
"set cluster loglevel"
,
&
MgmApiSession
::
setClusterLogLevel
,
""
),
MGM_ARG
(
"node"
,
Int
,
Mandatory
,
"Node"
),
MGM_ARG
(
"category"
,
String
,
Mandatory
,
"Event category"
),
MGM_ARG
(
"category"
,
Int
,
Mandatory
,
"Event category"
),
MGM_ARG
(
"level"
,
Int
,
Mandatory
,
"Log level (0-15)"
),
MGM_CMD
(
"set logfilter"
,
&
MgmApiSession
::
setLogFilter
,
""
),
...
...
@@ -781,20 +781,35 @@ MgmApiSession::bye(Parser<MgmApiSession>::Context &,
void
MgmApiSession
::
setClusterLogLevel
(
Parser
<
MgmApiSession
>::
Context
&
,
Properties
const
&
args
)
{
Uint32
node
,
level
,
category
;
const
char
*
reply
=
"set cluster loglevel reply"
;
Uint32
node
,
level
,
cat
;
BaseString
errorString
;
SetLogLevelOrd
logLevel
;
int
result
;
DBUG_ENTER
(
"MgmApiSession::setClusterLogLevel"
);
args
.
get
(
"node"
,
&
node
);
args
.
get
(
"category"
,
&
cat
egory
);
args
.
get
(
"category"
,
&
cat
);
args
.
get
(
"level"
,
&
level
);
DBUG_PRINT
(
"enter"
,(
"node=%d, category=%d, level=%d"
,
node
,
cat
,
level
));
/* XXX should use constants for this value */
if
(
level
>
15
)
{
m_output
->
println
(
"set cluster loglevel reply"
);
m_output
->
println
(
"result: Invalid loglevel
"
);
m_output
->
println
(
reply
);
m_output
->
println
(
"result: Invalid loglevel
%d"
,
level
);
m_output
->
println
(
""
);
return
;
DBUG_VOID_RETURN
;
}
LogLevel
::
EventCategory
category
=
(
LogLevel
::
EventCategory
)(
cat
-
(
int
)
CFG_MIN_LOGLEVEL
);
if
(
m_mgmsrv
.
m_event_listner
[
0
].
m_logLevel
.
setLogLevel
(
category
,
level
))
{
m_output
->
println
(
reply
);
m_output
->
println
(
"result: Invalid category %d"
,
category
);
m_output
->
println
(
""
);
DBUG_VOID_RETURN
;
}
EventSubscribeReq
req
;
...
...
@@ -802,10 +817,11 @@ MgmApiSession::setClusterLogLevel(Parser<MgmApiSession>::Context &,
req
.
noOfEntries
=
1
;
req
.
theData
[
0
]
=
(
category
<<
16
)
|
level
;
m_mgmsrv
.
m_log_level_requests
.
push_back
(
req
);
m_output
->
println
(
"set cluster loglevel reply"
);
m_output
->
println
(
reply
);
m_output
->
println
(
"result: Ok"
);
m_output
->
println
(
""
);
DBUG_VOID_RETURN
;
}
void
...
...
@@ -1263,21 +1279,17 @@ operator<<(NdbOut& out, const LogLevel & ll)
}
void
MgmStatS
ervice
::
log
(
int
eventType
,
const
Uint32
*
theData
,
NodeId
nodeId
){
Ndb_mgmd_event_s
ervice
::
log
(
int
eventType
,
const
Uint32
*
theData
,
NodeId
nodeId
){
Uint32
threshold
=
0
;
LogLevel
::
EventCategory
cat
=
LogLevel
::
llInvalid
;
Uint32
threshold
;
LogLevel
::
EventCategory
cat
;
Logger
::
LoggerLevel
severity
;
int
i
;
DBUG_ENTER
(
"Ndb_mgmd_event_service::log"
);
DBUG_PRINT
(
"enter"
,(
"eventType=%d, nodeid=%d"
,
eventType
,
nodeId
));
for
(
i
=
0
;
(
unsigned
)
i
<
EventLogger
::
matrixSize
;
i
++
){
if
(
EventLogger
::
matrix
[
i
].
eventType
==
eventType
){
cat
=
EventLogger
::
matrix
[
i
].
eventCategory
;
threshold
=
EventLogger
::
matrix
[
i
].
threshold
;
break
;
}
}
if
(
cat
==
LogLevel
::
llInvalid
)
return
;
if
(
EventLoggerBase
::
event_lookup
(
eventType
,
cat
,
threshold
,
severity
))
DBUG_VOID_RETURN
;
char
m_text
[
256
];
EventLogger
::
getText
(
m_text
,
sizeof
(
m_text
),
eventType
,
theData
,
nodeId
);
...
...
@@ -1316,10 +1328,11 @@ MgmStatService::log(int eventType, const Uint32* theData, NodeId nodeId){
m_mgmsrv
->
m_log_level_requests
.
push_back
(
req
);
}
}
DBUG_VOID_RETURN
;
}
void
MgmStatService
::
add_listener
(
const
StatL
istener
&
client
){
Ndb_mgmd_event_service
::
add_listener
(
const
Event_l
istener
&
client
){
m_clients
.
push_back
(
client
);
LogLevel
tmp
=
m_logLevel
;
tmp
.
set_max
(
client
.
m_logLevel
);
...
...
@@ -1334,7 +1347,7 @@ MgmStatService::add_listener(const StatListener& client){
}
void
MgmStatService
::
stopS
essions
(){
Ndb_mgmd_event_service
::
stop_s
essions
(){
for
(
int
i
=
m_clients
.
size
()
-
1
;
i
>=
0
;
i
--
){
if
(
m_clients
[
i
].
m_socket
>=
0
){
NDB_CLOSE_SOCKET
(
m_clients
[
i
].
m_socket
);
...
...
@@ -1374,7 +1387,7 @@ MgmApiSession::listen_event(Parser<MgmApiSession>::Context & ctx,
int
result
=
0
;
BaseString
msg
;
MgmStatService
::
StatL
istener
le
;
Ndb_mgmd_event_service
::
Event_l
istener
le
;
le
.
m_socket
=
m_socket
;
Vector
<
BaseString
>
list
;
...
...
@@ -1419,7 +1432,7 @@ MgmApiSession::listen_event(Parser<MgmApiSession>::Context & ctx,
goto
done
;
}
m_mgmsrv
.
m_
statisticsL
istner
.
add_listener
(
le
);
m_mgmsrv
.
m_
event_l
istner
.
add_listener
(
le
);
m_stop
=
true
;
m_socket
=
-
1
;
...
...
ndb/src/ndbapi/TransporterFacade.cpp
View file @
02dab285
...
...
@@ -626,6 +626,9 @@ TransporterFacade::ReportNodeFailureComplete(NodeId tNodeId)
* After the restart the node is up again and the Ndb object
* might not have noticed the failure.
*/
DBUG_ENTER
(
"TransporterFacade::ReportNodeFailureComplete"
);
DBUG_PRINT
(
"enter"
,(
"nodeid= %d"
,
tNodeId
));
Uint32
sz
=
m_threads
.
m_statusNext
.
size
();
for
(
Uint32
i
=
0
;
i
<
sz
;
i
++
)
{
if
(
m_threads
.
getInUse
(
i
)){
...
...
@@ -634,6 +637,7 @@ TransporterFacade::ReportNodeFailureComplete(NodeId tNodeId)
(
*
RegPC
)
(
obj
,
tNodeId
,
false
,
true
);
}
}
DBUG_VOID_RETURN
;
}
void
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment