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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
546c2f50
Commit
546c2f50
authored
Jan 11, 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/51-work
parents
403efda2
6ca26ea1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
153 additions
and
37 deletions
+153
-37
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
+2
-1
storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp
storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp
+21
-0
storage/ndb/test/ndbapi/testNodeRestart.cpp
storage/ndb/test/ndbapi/testNodeRestart.cpp
+126
-36
storage/ndb/test/run-test/daily-basic-tests.txt
storage/ndb/test/run-test/daily-basic-tests.txt
+4
-0
No files found.
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
View file @
546c2f50
...
...
@@ -3741,7 +3741,6 @@ void Dbdih::endTakeOver(Uint32 takeOverPtrI)
takeOverPtr
.
i
=
takeOverPtrI
;
ptrCheckGuard
(
takeOverPtr
,
MAX_NDB_NODES
,
takeOverRecord
);
releaseTakeOver
(
takeOverPtrI
);
if
((
takeOverPtr
.
p
->
toMasterStatus
!=
TakeOverRecord
::
IDLE
)
&&
(
takeOverPtr
.
p
->
toMasterStatus
!=
TakeOverRecord
::
TO_WAIT_START_TAKE_OVER
))
{
jam
();
...
...
@@ -3755,6 +3754,7 @@ void Dbdih::endTakeOver(Uint32 takeOverPtrI)
}
//if
setAllowNodeStart
(
takeOverPtr
.
p
->
toStartingNode
,
true
);
initTakeOver
(
takeOverPtr
);
releaseTakeOver
(
takeOverPtrI
);
}
//Dbdih::endTakeOver()
void
Dbdih
::
releaseTakeOver
(
Uint32
takeOverPtrI
)
...
...
@@ -4914,6 +4914,7 @@ void Dbdih::handleTakeOverNewMaster(Signal* signal, Uint32 takeOverPtrI)
break
;
}
ndbrequire
(
ok
);
endTakeOver
(
takeOverPtr
.
i
);
}
//if
}
//Dbdih::handleTakeOverNewMaster()
...
...
storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp
View file @
546c2f50
...
...
@@ -3050,6 +3050,17 @@ void Qmgr::failReportLab(Signal* signal, Uint16 aFailedNode,
systemErrorLab
(
signal
,
__LINE__
);
return
;
}
//if
if
(
getNodeState
().
startLevel
<
NodeState
::
SL_STARTED
)
{
jam
();
CRASH_INSERTION
(
932
);
char
buf
[
100
];
BaseString
::
snprintf
(
buf
,
100
,
"Node failure during restart"
);
progError
(
__LINE__
,
NDBD_EXIT_SR_OTHERNODEFAILED
,
buf
);
ndbrequire
(
false
);
}
TnoFailedNodes
=
cnoFailedNodes
;
failReport
(
signal
,
failedNodePtr
.
i
,
(
UintR
)
ZTRUE
,
aFailCause
);
if
(
cpresident
==
getOwnNodeId
())
{
...
...
@@ -3136,6 +3147,16 @@ void Qmgr::execPREP_FAILREQ(Signal* signal)
return
;
}
//if
if
(
getNodeState
().
startLevel
<
NodeState
::
SL_STARTED
)
{
jam
();
CRASH_INSERTION
(
932
);
char
buf
[
100
];
BaseString
::
snprintf
(
buf
,
100
,
"Node failure during restart"
);
progError
(
__LINE__
,
NDBD_EXIT_SR_OTHERNODEFAILED
,
buf
);
ndbrequire
(
false
);
}
guard0
=
cnoPrepFailedNodes
-
1
;
arrGuard
(
guard0
,
MAX_NDB_NODES
);
for
(
Tindex
=
0
;
Tindex
<=
guard0
;
Tindex
++
)
{
...
...
storage/ndb/test/ndbapi/testNodeRestart.cpp
View file @
546c2f50
...
...
@@ -932,6 +932,79 @@ int runBug20185(NDBT_Context* ctx, NDBT_Step* step){
return
NDBT_OK
;
}
int
runBug24717
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
int
result
=
NDBT_OK
;
int
loops
=
ctx
->
getNumLoops
();
int
records
=
ctx
->
getNumRecords
();
NdbRestarter
restarter
;
Ndb
*
pNdb
=
GETNDB
(
step
);
HugoTransactions
hugoTrans
(
*
ctx
->
getTab
());
int
dump
[]
=
{
9002
,
0
}
;
Uint32
ownNode
=
refToNode
(
pNdb
->
getReference
());
dump
[
1
]
=
ownNode
;
for
(;
loops
;
loops
--
)
{
int
nodeId
=
restarter
.
getRandomNotMasterNodeId
(
rand
());
restarter
.
restartOneDbNode
(
nodeId
,
false
,
true
,
true
);
restarter
.
waitNodesNoStart
(
&
nodeId
,
1
);
if
(
restarter
.
dumpStateOneNode
(
nodeId
,
dump
,
2
))
return
NDBT_FAILED
;
restarter
.
startNodes
(
&
nodeId
,
1
);
for
(
Uint32
i
=
0
;
i
<
100
;
i
++
)
{
hugoTrans
.
pkReadRecords
(
pNdb
,
100
,
1
,
NdbOperation
::
LM_CommittedRead
);
}
restarter
.
waitClusterStarted
();
}
return
NDBT_OK
;
}
int
runBug25364
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
int
result
=
NDBT_OK
;
NdbRestarter
restarter
;
Ndb
*
pNdb
=
GETNDB
(
step
);
int
loops
=
ctx
->
getNumLoops
();
if
(
restarter
.
getNumDbNodes
()
<
4
)
return
NDBT_OK
;
int
val2
[]
=
{
DumpStateOrd
::
CmvmiSetRestartOnErrorInsert
,
1
};
for
(;
loops
;
loops
--
)
{
int
master
=
restarter
.
getMasterNodeId
();
int
victim
=
restarter
.
getRandomNodeOtherNodeGroup
(
master
,
rand
());
int
second
=
restarter
.
getRandomNodeSameNodeGroup
(
victim
,
rand
());
int
dump
[]
=
{
935
,
victim
}
;
if
(
restarter
.
dumpStateOneNode
(
master
,
dump
,
2
))
return
NDBT_FAILED
;
if
(
restarter
.
dumpStateOneNode
(
master
,
val2
,
2
))
return
NDBT_FAILED
;
if
(
restarter
.
restartOneDbNode
(
second
,
false
,
true
,
true
))
return
NDBT_FAILED
;
int
nodes
[
2
]
=
{
master
,
second
};
if
(
restarter
.
waitNodesNoStart
(
nodes
,
2
))
return
NDBT_FAILED
;
restarter
.
startNodes
(
nodes
,
2
);
if
(
restarter
.
waitNodesStarted
(
nodes
,
2
))
return
NDBT_FAILED
;
}
}
int
runBug21271
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
int
result
=
NDBT_OK
;
...
...
@@ -996,42 +1069,6 @@ runBug24543(NDBT_Context* ctx, NDBT_Step* step){
}
return
NDBT_OK
;
}
int
runBug24717
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
int
result
=
NDBT_OK
;
int
loops
=
ctx
->
getNumLoops
();
int
records
=
ctx
->
getNumRecords
();
NdbRestarter
restarter
;
Ndb
*
pNdb
=
GETNDB
(
step
);
HugoTransactions
hugoTrans
(
*
ctx
->
getTab
());
int
dump
[]
=
{
9000
,
0
}
;
Uint32
ownNode
=
refToNode
(
pNdb
->
getReference
());
dump
[
1
]
=
ownNode
;
for
(;
loops
;
loops
--
)
{
int
nodeId
=
restarter
.
getRandomNotMasterNodeId
(
rand
());
restarter
.
restartOneDbNode
(
nodeId
,
false
,
true
,
true
);
restarter
.
waitNodesNoStart
(
&
nodeId
,
1
);
if
(
restarter
.
dumpStateOneNode
(
nodeId
,
dump
,
2
))
return
NDBT_FAILED
;
restarter
.
startNodes
(
&
nodeId
,
1
);
for
(
Uint32
i
=
0
;
i
<
100
;
i
++
)
{
hugoTrans
.
pkReadRecords
(
pNdb
,
100
,
1
,
NdbOperation
::
LM_CommittedRead
);
}
int
reset
[
2
]
=
{
9001
,
0
};
restarter
.
dumpStateOneNode
(
nodeId
,
reset
,
2
);
restarter
.
waitClusterStarted
();
}
return
NDBT_OK
;
}
int
runBug25364
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
int
result
=
NDBT_OK
;
...
...
@@ -1123,6 +1160,56 @@ int runBug25468(NDBT_Context* ctx, NDBT_Step* step){
if
(
restarter
.
startAll
())
return
NDBT_FAILED
;
if
(
restarter
.
waitClusterStarted
())
return
NDBT_FAILED
;
}
return
NDBT_OK
;
}
int
runBug25554
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
int
result
=
NDBT_OK
;
int
loops
=
ctx
->
getNumLoops
();
int
records
=
ctx
->
getNumRecords
();
NdbRestarter
restarter
;
if
(
restarter
.
getNumDbNodes
()
<
4
)
return
NDBT_OK
;
for
(
int
i
=
0
;
i
<
loops
;
i
++
)
{
int
master
=
restarter
.
getMasterNodeId
();
int
node1
=
restarter
.
getRandomNodeOtherNodeGroup
(
master
,
rand
());
restarter
.
restartOneDbNode
(
node1
,
false
,
true
,
true
);
int
val2
[]
=
{
DumpStateOrd
::
CmvmiSetRestartOnErrorInsert
,
1
};
if
(
restarter
.
dumpStateOneNode
(
master
,
val2
,
2
))
return
NDBT_FAILED
;
if
(
restarter
.
insertErrorInNode
(
master
,
7141
))
return
NDBT_FAILED
;
if
(
restarter
.
waitNodesNoStart
(
&
node1
,
1
))
return
NDBT_FAILED
;
if
(
restarter
.
dumpStateOneNode
(
node1
,
val2
,
2
))
return
NDBT_FAILED
;
if
(
restarter
.
insertErrorInNode
(
node1
,
932
))
return
NDBT_FAILED
;
if
(
restarter
.
startNodes
(
&
node1
,
1
))
return
NDBT_FAILED
;
int
nodes
[]
=
{
master
,
node1
};
if
(
restarter
.
waitNodesNoStart
(
nodes
,
2
))
return
NDBT_FAILED
;
if
(
restarter
.
startNodes
(
nodes
,
2
))
return
NDBT_FAILED
;
if
(
restarter
.
waitClusterStarted
())
return
NDBT_FAILED
;
}
...
...
@@ -1463,6 +1550,9 @@ TESTCASE("Bug25364", ""){
TESTCASE
(
"Bug25468"
,
""
){
INITIALIZER
(
runBug25468
);
}
TESTCASE
(
"Bug25554"
,
""
){
INITIALIZER
(
runBug25554
);
}
NDBT_TESTSUITE_END
(
testNodeRestart
);
int
main
(
int
argc
,
const
char
**
argv
){
...
...
storage/ndb/test/run-test/daily-basic-tests.txt
View file @
546c2f50
...
...
@@ -517,6 +517,10 @@ max-time: 1000
cmd: testNodeRestart
args: -n Bug25364 T1
max-time: 1000
cmd: testNodeRestart
args: -n Bug25554 T1
#
# DICT TESTS
max-time: 1500
...
...
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