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
9a85d74e
Commit
9a85d74e
authored
Jan 23, 2007
by
tomas@poseidon.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge poseidon.mysql.com:/home/tomas/mysql-5.0-ndb
into poseidon.mysql.com:/home/tomas/mysql-5.1-new-ndb
parents
a9193743
6825593d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
19 deletions
+51
-19
storage/ndb/src/mgmsrv/MgmtSrvr.cpp
storage/ndb/src/mgmsrv/MgmtSrvr.cpp
+35
-13
storage/ndb/src/ndbapi/ClusterMgr.cpp
storage/ndb/src/ndbapi/ClusterMgr.cpp
+5
-4
storage/ndb/src/ndbapi/ClusterMgr.hpp
storage/ndb/src/ndbapi/ClusterMgr.hpp
+2
-2
storage/ndb/src/ndbapi/SignalSender.cpp
storage/ndb/src/ndbapi/SignalSender.cpp
+9
-0
No files found.
storage/ndb/src/mgmsrv/MgmtSrvr.cpp
View file @
9a85d74e
...
...
@@ -137,7 +137,10 @@ MgmtSrvr::logLevelThreadRun()
m_started_nodes
.
erase
(
0
,
false
);
m_started_nodes
.
unlock
();
setEventReportingLevelImpl
(
node
,
req
);
if
(
setEventReportingLevelImpl
(
node
,
req
))
{
ndbout_c
(
"setEventReportingLevelImpl(%d): failed"
,
node
);
}
SetLogLevelOrd
ord
;
ord
=
m_nodeLogLevel
[
node
];
...
...
@@ -155,10 +158,16 @@ MgmtSrvr::logLevelThreadRun()
m_log_level_requests
.
erase
(
0
,
false
);
m_log_level_requests
.
unlock
();
if
(
req
.
blockRef
==
0
){
if
(
req
.
blockRef
==
0
)
{
req
.
blockRef
=
_ownReference
;
setEventReportingLevelImpl
(
0
,
req
);
}
else
{
if
(
setEventReportingLevelImpl
(
0
,
req
))
{
ndbout_c
(
"setEventReportingLevelImpl: failed 2!"
);
}
}
else
{
SetLogLevelOrd
ord
;
ord
=
req
;
setNodeLogLevelImpl
(
req
.
blockRef
,
ord
);
...
...
@@ -1388,9 +1397,6 @@ int MgmtSrvr::restartDB(bool nostart, bool initialStart,
NodeId
nodeId
=
0
;
NDB_TICKS
maxTime
=
NdbTick_CurrentMillisecond
()
+
waitTime
;
ndbout_c
(
" %d"
,
nodes
.
get
(
1
));
ndbout_c
(
" %d"
,
nodes
.
get
(
2
));
while
(
getNextNodeId
(
&
nodeId
,
NDB_MGM_NODE_TYPE_NDB
))
{
if
(
!
nodes
.
get
(
nodeId
))
continue
;
...
...
@@ -1596,6 +1602,11 @@ MgmtSrvr::setEventReportingLevelImpl(int nodeId,
}
}
if
(
nodes
.
isclear
())
{
return
SEND_OR_RECEIVE_FAILED
;
}
int
error
=
0
;
while
(
!
nodes
.
isclear
())
{
...
...
@@ -1612,16 +1623,24 @@ MgmtSrvr::setEventReportingLevelImpl(int nodeId,
error
=
1
;
break
;
}
// Since sending okToSend(true),
// there is no guarantee that NF_COMPLETEREP will come
// i.e listen also to NODE_FAILREP
case
GSN_NODE_FAILREP
:
{
const
NodeFailRep
*
const
rep
=
CAST_CONSTPTR
(
NodeFailRep
,
signal
->
getDataPtr
());
NdbNodeBitmask
mask
;
mask
.
assign
(
NdbNodeBitmask
::
Size
,
rep
->
theNodes
);
nodes
.
bitANDC
(
mask
);
break
;
}
case
GSN_NF_COMPLETEREP
:{
const
NFCompleteRep
*
const
rep
=
CAST_CONSTPTR
(
NFCompleteRep
,
signal
->
getDataPtr
());
nodes
.
clear
(
rep
->
failedNodeId
);
break
;
}
case
GSN_NODE_FAILREP
:{
// ignore, NF_COMPLETEREP will arrive later
break
;
}
default:
report_unknown_signal
(
signal
);
return
SEND_OR_RECEIVE_FAILED
;
...
...
@@ -1918,7 +1937,10 @@ MgmtSrvr::handleStatus(NodeId nodeId, bool alive, bool nfComplete)
theData
[
1
]
=
nodeId
;
if
(
alive
)
{
if
(
nodeTypes
[
nodeId
]
==
NODE_TYPE_DB
)
{
m_started_nodes
.
push_back
(
nodeId
);
}
rep
->
setEventType
(
NDB_LE_Connected
);
}
else
{
rep
->
setEventType
(
NDB_LE_Disconnected
);
...
...
storage/ndb/src/ndbapi/ClusterMgr.cpp
View file @
9a85d74e
...
...
@@ -490,6 +490,7 @@ ClusterMgr::reportConnected(NodeId nodeId){
theNode
.
m_info
.
m_version
=
0
;
theNode
.
compatible
=
true
;
theNode
.
nfCompleteRep
=
true
;
theNode
.
m_state
.
startLevel
=
NodeState
::
SL_NOTHING
;
theFacade
.
ReportNodeAlive
(
nodeId
);
DBUG_VOID_RETURN
;
...
...
@@ -502,14 +503,13 @@ ClusterMgr::reportDisconnected(NodeId nodeId){
noOfConnectedNodes
--
;
theNodes
[
nodeId
].
connected
=
false
;
theNodes
[
nodeId
].
m_state
.
m_connected_nodes
.
clear
();
reportNodeFailed
(
nodeId
);
reportNodeFailed
(
nodeId
,
true
);
}
void
ClusterMgr
::
reportNodeFailed
(
NodeId
nodeId
){
ClusterMgr
::
reportNodeFailed
(
NodeId
nodeId
,
bool
disconnect
){
Node
&
theNode
=
theNodes
[
nodeId
];
...
...
@@ -520,10 +520,11 @@ ClusterMgr::reportNodeFailed(NodeId nodeId){
{
theFacade
.
doDisconnect
(
nodeId
);
}
const
bool
report
=
(
theNode
.
m_state
.
startLevel
!=
NodeState
::
SL_NOTHING
);
theNode
.
m_state
.
startLevel
=
NodeState
::
SL_NOTHING
;
if
(
report
)
if
(
disconnect
||
report
)
{
theFacade
.
ReportNodeDead
(
nodeId
);
}
...
...
storage/ndb/src/ndbapi/ClusterMgr.hpp
View file @
9a85d74e
...
...
@@ -104,7 +104,7 @@ private:
NdbMutex
*
clusterMgrThreadMutex
;
void
showState
(
NodeId
nodeId
);
void
reportNodeFailed
(
NodeId
nodeId
);
void
reportNodeFailed
(
NodeId
nodeId
,
bool
disconnect
=
false
);
/**
* Signals received
...
...
storage/ndb/src/ndbapi/SignalSender.cpp
View file @
9a85d74e
...
...
@@ -19,6 +19,14 @@
#include <signaldata/NFCompleteRep.hpp>
#include <signaldata/NodeFailRep.hpp>
static
void
require
(
bool
x
)
{
if
(
!
x
)
abort
();
}
SimpleSignal
::
SimpleSignal
(
bool
dealloc
){
memset
(
this
,
0
,
sizeof
(
*
this
));
deallocSections
=
dealloc
;
...
...
@@ -136,6 +144,7 @@ SignalSender::waitFor(Uint32 timeOutMillis, T & t)
{
SimpleSignal
*
s
=
t
.
check
(
m_jobBuffer
);
if
(
s
!=
0
){
m_usedBuffer
.
push_back
(
s
);
return
s
;
}
...
...
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