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
d6a08d05
Commit
d6a08d05
authored
Feb 19, 2007
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge perch.ndb.mysql.com:/home/jonas/src/50-work
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-ndb
parents
8dd23d39
4c3fef3a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
69 additions
and
1 deletion
+69
-1
ndb/src/kernel/blocks/dbdih/Dbdih.hpp
ndb/src/kernel/blocks/dbdih/Dbdih.hpp
+1
-0
ndb/src/kernel/blocks/dbdih/DbdihInit.cpp
ndb/src/kernel/blocks/dbdih/DbdihInit.cpp
+1
-0
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
+22
-0
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
+2
-1
ndb/test/ndbapi/testNodeRestart.cpp
ndb/test/ndbapi/testNodeRestart.cpp
+43
-0
No files found.
ndb/src/kernel/blocks/dbdih/Dbdih.hpp
View file @
d6a08d05
...
...
@@ -1366,6 +1366,7 @@ private:
Uint32
csystemnodes
;
Uint32
currentgcp
;
Uint32
c_newest_restorable_gci
;
Uint32
c_set_initial_start_flag
;
enum
GcpMasterTakeOverState
{
GMTOS_IDLE
=
0
,
...
...
ndb/src/kernel/blocks/dbdih/DbdihInit.cpp
View file @
d6a08d05
...
...
@@ -74,6 +74,7 @@ void Dbdih::initData()
c_blockCommit
=
false
;
c_blockCommitNo
=
1
;
cntrlblockref
=
RNIL
;
c_set_initial_start_flag
=
FALSE
;
}
//Dbdih::initData()
void
Dbdih
::
initRecords
()
...
...
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
View file @
d6a08d05
...
...
@@ -666,6 +666,12 @@ done:
{
jam
();
memcpy
(
sysfileData
,
cdata
,
sizeof
(
sysfileData
));
if
(
c_set_initial_start_flag
)
{
jam
();
Sysfile
::
setInitialStartOngoing
(
SYSFILE
->
systemRestartBits
);
}
}
c_copyGCISlave
.
m_copyReason
=
reason
;
...
...
@@ -1259,6 +1265,11 @@ void Dbdih::execNDB_STTOR(Signal* signal)
// The permission is given by the master node in the alive set.
/*-----------------------------------------------------------------------*/
createMutexes
(
signal
,
0
);
if
(
cstarttype
==
NodeState
::
ST_INITIAL_NODE_RESTART
)
{
jam
();
c_set_initial_start_flag
=
TRUE
;
// In sysfile...
}
break
;
case
ZNDB_SPH3
:
...
...
@@ -10284,6 +10295,17 @@ Dbdih::sendLCP_COMPLETE_REP(Signal* signal){
sendSignal
(
c_lcpState
.
m_masterLcpDihRef
,
GSN_LCP_COMPLETE_REP
,
signal
,
LcpCompleteRep
::
SignalLength
,
JBB
);
/**
* Say that an initial node restart does not need to be redone
* once node has been part of first LCP
*/
if
(
c_set_initial_start_flag
&&
c_lcpState
.
m_participatingLQH
.
get
(
getOwnNodeId
()))
{
jam
();
c_set_initial_start_flag
=
FALSE
;
}
}
/*-------------------------------------------------------------------------- */
...
...
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
View file @
d6a08d05
...
...
@@ -11672,7 +11672,8 @@ void Dblqh::execGCP_SAVEREQ(Signal* signal)
return
;
}
if
(
getNodeState
().
getNodeRestartInProgress
()){
if
(
getNodeState
().
getNodeRestartInProgress
()
&&
cstartRecReq
==
ZFALSE
)
{
GCPSaveRef
*
const
saveRef
=
(
GCPSaveRef
*
)
&
signal
->
theData
[
0
];
saveRef
->
dihPtr
=
dihPtr
;
saveRef
->
nodeId
=
getOwnNodeId
();
...
...
ndb/test/ndbapi/testNodeRestart.cpp
View file @
d6a08d05
...
...
@@ -1084,6 +1084,46 @@ retry:
return
NDBT_OK
;
}
int
runBug26481
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
)
{
int
result
=
NDBT_OK
;
int
loops
=
ctx
->
getNumLoops
();
int
records
=
ctx
->
getNumRecords
();
NdbRestarter
res
;
int
node
=
res
.
getRandomNotMasterNodeId
(
rand
());
ndbout_c
(
"node: %d"
,
node
);
if
(
res
.
restartOneDbNode
(
node
,
true
,
true
,
true
))
return
NDBT_FAILED
;
if
(
res
.
waitNodesNoStart
(
&
node
,
1
))
return
NDBT_FAILED
;
int
val2
[]
=
{
DumpStateOrd
::
CmvmiSetRestartOnErrorInsert
,
1
};
if
(
res
.
dumpStateOneNode
(
node
,
val2
,
2
))
return
NDBT_FAILED
;
if
(
res
.
insertErrorInNode
(
node
,
7018
))
return
NDBT_FAILED
;
if
(
res
.
startNodes
(
&
node
,
1
))
return
NDBT_FAILED
;
res
.
waitNodesStartPhase
(
&
node
,
1
,
3
);
if
(
res
.
waitNodesNoStart
(
&
node
,
1
))
return
NDBT_FAILED
;
res
.
startNodes
(
&
node
,
1
);
if
(
res
.
waitClusterStarted
())
return
NDBT_FAILED
;
return
NDBT_OK
;
}
NDBT_TESTSUITE
(
testNodeRestart
);
TESTCASE
(
"NoLoad"
,
"Test that one node at a time can be stopped and then restarted "
\
...
...
@@ -1408,6 +1448,9 @@ TESTCASE("Bug25554", ""){
TESTCASE
(
"Bug26457"
,
""
){
INITIALIZER
(
runBug26457
);
}
TESTCASE
(
"Bug26481"
,
""
){
INITIALIZER
(
runBug26481
);
}
NDBT_TESTSUITE_END
(
testNodeRestart
);
int
main
(
int
argc
,
const
char
**
argv
){
...
...
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