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
ad7e80e7
Commit
ad7e80e7
authored
May 04, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
merge
ndb/src/mgmapi/mgmapi.cpp: Auto merged
parents
ec1a4d55
80abad58
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
6 deletions
+27
-6
ndb/src/mgmapi/mgmapi.cpp
ndb/src/mgmapi/mgmapi.cpp
+6
-0
ndb/src/ndbapi/ClusterMgr.cpp
ndb/src/ndbapi/ClusterMgr.cpp
+7
-6
ndb/src/ndbapi/ClusterMgr.hpp
ndb/src/ndbapi/ClusterMgr.hpp
+14
-0
No files found.
ndb/src/mgmapi/mgmapi.cpp
View file @
ad7e80e7
...
@@ -892,7 +892,10 @@ ndb_mgm_restart2(NdbMgmHandle handle, int no_of_nodes, const int * node_list,
...
@@ -892,7 +892,10 @@ ndb_mgm_restart2(NdbMgmHandle handle, int no_of_nodes, const int * node_list,
args
.
put
(
"initialstart"
,
initial
);
args
.
put
(
"initialstart"
,
initial
);
args
.
put
(
"nostart"
,
nostart
);
args
.
put
(
"nostart"
,
nostart
);
const
Properties
*
reply
;
const
Properties
*
reply
;
const
int
timeout
=
handle
->
read_timeout
;
handle
->
read_timeout
=
5
*
60
*
1000
;
// 5 minutes
reply
=
ndb_mgm_call
(
handle
,
restart_reply
,
"restart all"
,
&
args
);
reply
=
ndb_mgm_call
(
handle
,
restart_reply
,
"restart all"
,
&
args
);
handle
->
read_timeout
=
timeout
;
CHECK_REPLY
(
reply
,
-
1
);
CHECK_REPLY
(
reply
,
-
1
);
BaseString
result
;
BaseString
result
;
...
@@ -925,7 +928,10 @@ ndb_mgm_restart2(NdbMgmHandle handle, int no_of_nodes, const int * node_list,
...
@@ -925,7 +928,10 @@ ndb_mgm_restart2(NdbMgmHandle handle, int no_of_nodes, const int * node_list,
args
.
put
(
"nostart"
,
nostart
);
args
.
put
(
"nostart"
,
nostart
);
const
Properties
*
reply
;
const
Properties
*
reply
;
const
int
timeout
=
handle
->
read_timeout
;
handle
->
read_timeout
=
5
*
60
*
1000
;
// 5 minutes
reply
=
ndb_mgm_call
(
handle
,
restart_reply
,
"restart node"
,
&
args
);
reply
=
ndb_mgm_call
(
handle
,
restart_reply
,
"restart node"
,
&
args
);
handle
->
read_timeout
=
timeout
;
if
(
reply
!=
NULL
)
{
if
(
reply
!=
NULL
)
{
BaseString
result
;
BaseString
result
;
reply
->
get
(
"result"
,
result
);
reply
->
get
(
"result"
,
result
);
...
...
ndb/src/ndbapi/ClusterMgr.cpp
View file @
ad7e80e7
...
@@ -66,6 +66,7 @@ ClusterMgr::ClusterMgr(TransporterFacade & _facade):
...
@@ -66,6 +66,7 @@ ClusterMgr::ClusterMgr(TransporterFacade & _facade):
{
{
ndbSetOwnVersion
();
ndbSetOwnVersion
();
clusterMgrThreadMutex
=
NdbMutex_Create
();
clusterMgrThreadMutex
=
NdbMutex_Create
();
noOfAliveNodes
=
0
;
noOfConnectedNodes
=
0
;
noOfConnectedNodes
=
0
;
theClusterMgrThread
=
0
;
theClusterMgrThread
=
0
;
}
}
...
@@ -336,9 +337,9 @@ ClusterMgr::execAPI_REGCONF(const Uint32 * theData){
...
@@ -336,9 +337,9 @@ ClusterMgr::execAPI_REGCONF(const Uint32 * theData){
node
.
m_state
=
apiRegConf
->
nodeState
;
node
.
m_state
=
apiRegConf
->
nodeState
;
if
(
node
.
compatible
&&
(
node
.
m_state
.
startLevel
==
NodeState
::
SL_STARTED
||
if
(
node
.
compatible
&&
(
node
.
m_state
.
startLevel
==
NodeState
::
SL_STARTED
||
node
.
m_state
.
startLevel
==
NodeState
::
SL_SINGLEUSER
)){
node
.
m_state
.
startLevel
==
NodeState
::
SL_SINGLEUSER
)){
node
.
m_alive
=
true
;
set_node_alive
(
node
,
true
)
;
}
else
{
}
else
{
node
.
m_alive
=
false
;
set_node_alive
(
node
,
false
)
;
}
//if
}
//if
node
.
hbSent
=
0
;
node
.
hbSent
=
0
;
node
.
hbCounter
=
0
;
node
.
hbCounter
=
0
;
...
@@ -361,7 +362,7 @@ ClusterMgr::execAPI_REGREF(const Uint32 * theData){
...
@@ -361,7 +362,7 @@ ClusterMgr::execAPI_REGREF(const Uint32 * theData){
assert
(
node
.
defined
==
true
);
assert
(
node
.
defined
==
true
);
node
.
compatible
=
false
;
node
.
compatible
=
false
;
node
.
m_alive
=
false
;
set_node_alive
(
node
,
false
)
;
node
.
m_state
=
NodeState
::
SL_NOTHING
;
node
.
m_state
=
NodeState
::
SL_NOTHING
;
node
.
m_info
.
m_version
=
ref
->
version
;
node
.
m_info
.
m_version
=
ref
->
version
;
...
@@ -446,7 +447,7 @@ ClusterMgr::reportNodeFailed(NodeId nodeId){
...
@@ -446,7 +447,7 @@ ClusterMgr::reportNodeFailed(NodeId nodeId){
Node
&
theNode
=
theNodes
[
nodeId
];
Node
&
theNode
=
theNodes
[
nodeId
];
theNode
.
m_alive
=
false
;
set_node_alive
(
theNode
,
false
)
;
theNode
.
m_info
.
m_connectCount
++
;
theNode
.
m_info
.
m_connectCount
++
;
if
(
theNode
.
connected
)
if
(
theNode
.
connected
)
...
@@ -462,8 +463,8 @@ ClusterMgr::reportNodeFailed(NodeId nodeId){
...
@@ -462,8 +463,8 @@ ClusterMgr::reportNodeFailed(NodeId nodeId){
}
}
theNode
.
nfCompleteRep
=
false
;
theNode
.
nfCompleteRep
=
false
;
if
(
noOfAliveNodes
==
0
)
if
(
noOfConnectedNodes
==
0
)
{
{
NFCompleteRep
rep
;
NFCompleteRep
rep
;
for
(
Uint32
i
=
1
;
i
<
MAX_NODES
;
i
++
){
for
(
Uint32
i
=
1
;
i
<
MAX_NODES
;
i
++
){
if
(
theNodes
[
i
].
defined
&&
theNodes
[
i
].
nfCompleteRep
==
false
){
if
(
theNodes
[
i
].
defined
&&
theNodes
[
i
].
nfCompleteRep
==
false
){
...
...
ndb/src/ndbapi/ClusterMgr.hpp
View file @
ad7e80e7
...
@@ -80,6 +80,7 @@ public:
...
@@ -80,6 +80,7 @@ public:
Uint32
getNoOfConnectedNodes
()
const
;
Uint32
getNoOfConnectedNodes
()
const
;
private:
private:
Uint32
noOfAliveNodes
;
Uint32
noOfConnectedNodes
;
Uint32
noOfConnectedNodes
;
Node
theNodes
[
MAX_NODES
];
Node
theNodes
[
MAX_NODES
];
NdbThread
*
theClusterMgrThread
;
NdbThread
*
theClusterMgrThread
;
...
@@ -100,6 +101,19 @@ private:
...
@@ -100,6 +101,19 @@ private:
void
execAPI_REGREF
(
const
Uint32
*
theData
);
void
execAPI_REGREF
(
const
Uint32
*
theData
);
void
execNODE_FAILREP
(
const
Uint32
*
theData
);
void
execNODE_FAILREP
(
const
Uint32
*
theData
);
void
execNF_COMPLETEREP
(
const
Uint32
*
theData
);
void
execNF_COMPLETEREP
(
const
Uint32
*
theData
);
inline
void
set_node_alive
(
Node
&
node
,
bool
alive
){
if
(
node
.
m_alive
&&
!
alive
)
{
assert
(
noOfAliveNodes
);
noOfAliveNodes
--
;
}
else
if
(
!
node
.
m_alive
&&
alive
)
{
noOfAliveNodes
++
;
}
node
.
m_alive
=
alive
;
}
};
};
inline
inline
...
...
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