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
4a4425cc
Commit
4a4425cc
authored
Nov 08, 2007
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-ndb
into perch.ndb.mysql.com:/home/jonas/src/51-ndb
parents
fd91c3d1
f8c413a5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
122 additions
and
7 deletions
+122
-7
storage/ndb/src/kernel/blocks/ERROR_codes.txt
storage/ndb/src/kernel/blocks/ERROR_codes.txt
+6
-1
storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
+10
-0
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
+54
-6
storage/ndb/test/ndbapi/testNodeRestart.cpp
storage/ndb/test/ndbapi/testNodeRestart.cpp
+48
-0
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/ERROR_codes.txt
View file @
4a4425cc
...
@@ -5,7 +5,7 @@ Next DBACC 3002
...
@@ -5,7 +5,7 @@ Next DBACC 3002
Next DBTUP 4029
Next DBTUP 4029
Next DBLQH 5047
Next DBLQH 5047
Next DBDICT 6008
Next DBDICT 6008
Next DBDIH 719
3
Next DBDIH 719
5
Next DBTC 8054
Next DBTC 8054
Next CMVMI 9000
Next CMVMI 9000
Next BACKUP 10038
Next BACKUP 10038
...
@@ -81,6 +81,11 @@ Delay GCP_SAVEREQ by 10 secs
...
@@ -81,6 +81,11 @@ Delay GCP_SAVEREQ by 10 secs
7185: Dont reply to COPY_GCI_REQ where reason == GCP
7185: Dont reply to COPY_GCI_REQ where reason == GCP
7193: Dont send LCP_FRAG_ORD to self, and crash when sending first
LCP_FRAG_ORD(last)
7194: Force removeNodeFromStored to complete in the middle of MASTER_LCPCONF
ERROR CODES FOR TESTING NODE FAILURE, LOCAL CHECKPOINT HANDLING:
ERROR CODES FOR TESTING NODE FAILURE, LOCAL CHECKPOINT HANDLING:
-----------------------------------------------------------------
-----------------------------------------------------------------
...
...
storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
View file @
4a4425cc
...
@@ -1310,7 +1310,17 @@ private:
...
@@ -1310,7 +1310,17 @@ private:
LcpStatus
lcpStatus
;
LcpStatus
lcpStatus
;
Uint32
lcpStatusUpdatedPlace
;
Uint32
lcpStatusUpdatedPlace
;
struct
Save
{
LcpStatus
m_status
;
Uint32
m_place
;
}
m_saveState
[
10
];
void
setLcpStatus
(
LcpStatus
status
,
Uint32
line
){
void
setLcpStatus
(
LcpStatus
status
,
Uint32
line
){
for
(
Uint32
i
=
9
;
i
>
0
;
i
--
)
m_saveState
[
i
]
=
m_saveState
[
i
-
1
];
m_saveState
[
0
].
m_status
=
lcpStatus
;
m_saveState
[
0
].
m_place
=
lcpStatusUpdatedPlace
;
lcpStatus
=
status
;
lcpStatus
=
status
;
lcpStatusUpdatedPlace
=
line
;
lcpStatusUpdatedPlace
=
line
;
}
}
...
...
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
View file @
4a4425cc
...
@@ -5181,11 +5181,19 @@ void Dbdih::startRemoveFailedNode(Signal* signal, NodeRecordPtr failedNodePtr)
...
@@ -5181,11 +5181,19 @@ void Dbdih::startRemoveFailedNode(Signal* signal, NodeRecordPtr failedNodePtr)
}
}
jam
();
jam
();
signal
->
theData
[
0
]
=
DihContinueB
::
ZREMOVE_NODE_FROM_TABLE
;
signal
->
theData
[
1
]
=
failedNodePtr
.
i
;
if
(
!
ERROR_INSERTED
(
7194
))
signal
->
theData
[
2
]
=
0
;
// Tab id
{
sendSignal
(
reference
(),
GSN_CONTINUEB
,
signal
,
3
,
JBB
);
signal
->
theData
[
0
]
=
DihContinueB
::
ZREMOVE_NODE_FROM_TABLE
;
signal
->
theData
[
1
]
=
failedNodePtr
.
i
;
signal
->
theData
[
2
]
=
0
;
// Tab id
sendSignal
(
reference
(),
GSN_CONTINUEB
,
signal
,
3
,
JBB
);
}
else
{
ndbout_c
(
"7194 Not starting ZREMOVE_NODE_FROM_TABLE"
);
}
setLocalNodefailHandling
(
signal
,
failedNodePtr
.
i
,
NF_REMOVE_NODE_FROM_TABLE
);
setLocalNodefailHandling
(
signal
,
failedNodePtr
.
i
,
NF_REMOVE_NODE_FROM_TABLE
);
}
//Dbdih::startRemoveFailedNode()
}
//Dbdih::startRemoveFailedNode()
...
@@ -6114,12 +6122,22 @@ Dbdih::checkEmptyLcpComplete(Signal *signal){
...
@@ -6114,12 +6122,22 @@ Dbdih::checkEmptyLcpComplete(Signal *signal){
signal
->
theData
[
0
]
=
7012
;
signal
->
theData
[
0
]
=
7012
;
execDUMP_STATE_ORD
(
signal
);
execDUMP_STATE_ORD
(
signal
);
if
(
ERROR_INSERTED
(
7194
))
{
ndbout_c
(
"7194 starting ZREMOVE_NODE_FROM_TABLE"
);
signal
->
theData
[
0
]
=
DihContinueB
::
ZREMOVE_NODE_FROM_TABLE
;
signal
->
theData
[
1
]
=
c_lcpMasterTakeOverState
.
failedNodeId
;
signal
->
theData
[
2
]
=
0
;
// Tab id
sendSignal
(
reference
(),
GSN_CONTINUEB
,
signal
,
3
,
JBB
);
}
c_lcpMasterTakeOverState
.
set
(
LMTOS_INITIAL
,
__LINE__
);
c_lcpMasterTakeOverState
.
set
(
LMTOS_INITIAL
,
__LINE__
);
MasterLCPReq
*
const
req
=
(
MasterLCPReq
*
)
&
signal
->
theData
[
0
];
MasterLCPReq
*
const
req
=
(
MasterLCPReq
*
)
&
signal
->
theData
[
0
];
req
->
masterRef
=
reference
();
req
->
masterRef
=
reference
();
req
->
failedNodeId
=
c_lcpMasterTakeOverState
.
failedNodeId
;
req
->
failedNodeId
=
c_lcpMasterTakeOverState
.
failedNodeId
;
sendLoopMacro
(
MASTER_LCPREQ
,
sendMASTER_LCPREQ
);
sendLoopMacro
(
MASTER_LCPREQ
,
sendMASTER_LCPREQ
);
}
else
{
}
else
{
sendMASTER_LCPCONF
(
signal
);
sendMASTER_LCPCONF
(
signal
);
}
}
...
@@ -6432,6 +6450,15 @@ void Dbdih::execMASTER_LCPCONF(Signal* signal)
...
@@ -6432,6 +6450,15 @@ void Dbdih::execMASTER_LCPCONF(Signal* signal)
{
{
const
MasterLCPConf
*
const
conf
=
(
MasterLCPConf
*
)
&
signal
->
theData
[
0
];
const
MasterLCPConf
*
const
conf
=
(
MasterLCPConf
*
)
&
signal
->
theData
[
0
];
jamEntry
();
jamEntry
();
if
(
ERROR_INSERTED
(
7194
))
{
ndbout_c
(
"delaying MASTER_LCPCONF due to error 7194"
);
sendSignalWithDelay
(
reference
(),
GSN_MASTER_LCPCONF
,
signal
,
300
,
signal
->
getLength
());
return
;
}
Uint32
senderNodeId
=
conf
->
senderNodeId
;
Uint32
senderNodeId
=
conf
->
senderNodeId
;
MasterLCPConf
::
State
lcpState
=
(
MasterLCPConf
::
State
)
conf
->
lcpState
;
MasterLCPConf
::
State
lcpState
=
(
MasterLCPConf
::
State
)
conf
->
lcpState
;
const
Uint32
failedNodeId
=
conf
->
failedNodeId
;
const
Uint32
failedNodeId
=
conf
->
failedNodeId
;
...
@@ -6566,7 +6593,6 @@ void Dbdih::MASTER_LCPhandling(Signal* signal, Uint32 failedNodeId)
...
@@ -6566,7 +6593,6 @@ void Dbdih::MASTER_LCPhandling(Signal* signal, Uint32 failedNodeId)
#endif
#endif
c_lcpState
.
keepGci
=
SYSFILE
->
keepGCI
;
c_lcpState
.
keepGci
=
SYSFILE
->
keepGCI
;
c_lcpState
.
setLcpStatus
(
LCP_START_LCP_ROUND
,
__LINE__
);
startLcpRoundLoopLab
(
signal
,
0
,
0
);
startLcpRoundLoopLab
(
signal
,
0
,
0
);
break
;
break
;
}
}
...
@@ -10538,6 +10564,8 @@ void Dbdih::sendLastLCP_FRAG_ORD(Signal* signal)
...
@@ -10538,6 +10564,8 @@ void Dbdih::sendLastLCP_FRAG_ORD(Signal* signal)
if
(
ERROR_INSERTED
(
7075
)){
if
(
ERROR_INSERTED
(
7075
)){
continue
;
continue
;
}
}
CRASH_INSERTION
(
7193
);
BlockReference
ref
=
calcLqhBlockRef
(
nodePtr
.
i
);
BlockReference
ref
=
calcLqhBlockRef
(
nodePtr
.
i
);
sendSignal
(
ref
,
GSN_LCP_FRAG_ORD
,
signal
,
LcpFragOrd
::
SignalLength
,
JBB
);
sendSignal
(
ref
,
GSN_LCP_FRAG_ORD
,
signal
,
LcpFragOrd
::
SignalLength
,
JBB
);
}
}
...
@@ -10765,6 +10793,13 @@ Dbdih::checkLcpAllTablesDoneInLqh(){
...
@@ -10765,6 +10793,13 @@ Dbdih::checkLcpAllTablesDoneInLqh(){
CRASH_INSERTION2
(
7017
,
!
isMaster
());
CRASH_INSERTION2
(
7017
,
!
isMaster
());
c_lcpState
.
setLcpStatus
(
LCP_TAB_COMPLETED
,
__LINE__
);
c_lcpState
.
setLcpStatus
(
LCP_TAB_COMPLETED
,
__LINE__
);
if
(
ERROR_INSERTED
(
7194
))
{
ndbout_c
(
"CLEARING 7194"
);
CLEAR_ERROR_INSERT_VALUE
;
}
return
true
;
return
true
;
}
}
...
@@ -10954,6 +10989,11 @@ Dbdih::sendLCP_FRAG_ORD(Signal* signal,
...
@@ -10954,6 +10989,11 @@ Dbdih::sendLCP_FRAG_ORD(Signal* signal,
BlockReference
ref
=
calcLqhBlockRef
(
replicaPtr
.
p
->
procNode
);
BlockReference
ref
=
calcLqhBlockRef
(
replicaPtr
.
p
->
procNode
);
if
(
ERROR_INSERTED
(
7193
)
&&
replicaPtr
.
p
->
procNode
==
getOwnNodeId
())
{
return
;
}
LcpFragOrd
*
const
lcpFragOrd
=
(
LcpFragOrd
*
)
&
signal
->
theData
[
0
];
LcpFragOrd
*
const
lcpFragOrd
=
(
LcpFragOrd
*
)
&
signal
->
theData
[
0
];
lcpFragOrd
->
tableId
=
info
.
tableId
;
lcpFragOrd
->
tableId
=
info
.
tableId
;
lcpFragOrd
->
fragmentId
=
info
.
fragId
;
lcpFragOrd
->
fragmentId
=
info
.
fragId
;
...
@@ -14500,6 +14540,14 @@ Dbdih::execDUMP_STATE_ORD(Signal* signal)
...
@@ -14500,6 +14540,14 @@ Dbdih::execDUMP_STATE_ORD(Signal* signal)
(
"immediateLcpStart = %d masterLcpNodeId = %d"
,
(
"immediateLcpStart = %d masterLcpNodeId = %d"
,
c_lcpState
.
immediateLcpStart
,
c_lcpState
.
immediateLcpStart
,
refToNode
(
c_lcpState
.
m_masterLcpDihRef
));
refToNode
(
c_lcpState
.
m_masterLcpDihRef
));
for
(
Uint32
i
=
0
;
i
<
10
;
i
++
)
{
infoEvent
(
"%u : status: %u place: %u"
,
i
,
c_lcpState
.
m_saveState
[
i
].
m_status
,
c_lcpState
.
m_saveState
[
i
].
m_place
);
}
infoEvent
(
"-- Node %d LCP STATE --"
,
getOwnNodeId
());
infoEvent
(
"-- Node %d LCP STATE --"
,
getOwnNodeId
());
}
}
...
...
storage/ndb/test/ndbapi/testNodeRestart.cpp
View file @
4a4425cc
...
@@ -1830,6 +1830,51 @@ runBug31525(NDBT_Context* ctx, NDBT_Step* step)
...
@@ -1830,6 +1830,51 @@ runBug31525(NDBT_Context* ctx, NDBT_Step* step)
if
(
res
.
restartOneDbNode
(
nodes
[
1
],
false
,
false
,
true
))
if
(
res
.
restartOneDbNode
(
nodes
[
1
],
false
,
false
,
true
))
return
NDBT_FAILED
;
return
NDBT_FAILED
;
if
(
res
.
waitClusterStarted
())
return
NDBT_FAILED
;
return
NDBT_OK
;
}
int
runBug32160
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
)
{
int
result
=
NDBT_OK
;
int
loops
=
ctx
->
getNumLoops
();
int
records
=
ctx
->
getNumRecords
();
Ndb
*
pNdb
=
GETNDB
(
step
);
NdbRestarter
res
;
if
(
res
.
getNumDbNodes
()
<
2
)
{
return
NDBT_OK
;
}
int
master
=
res
.
getMasterNodeId
();
int
next
=
res
.
getNextMasterNodeId
(
master
);
if
(
res
.
insertErrorInNode
(
next
,
7194
))
{
return
NDBT_FAILED
;
}
int
val2
[]
=
{
DumpStateOrd
::
CmvmiSetRestartOnErrorInsert
,
1
};
if
(
res
.
dumpStateOneNode
(
master
,
val2
,
2
))
return
NDBT_FAILED
;
if
(
res
.
insertErrorInNode
(
master
,
7193
))
return
NDBT_FAILED
;
int
val3
[]
=
{
7099
};
if
(
res
.
dumpStateOneNode
(
master
,
val3
,
1
))
return
NDBT_FAILED
;
if
(
res
.
waitNodesNoStart
(
&
master
,
1
))
return
NDBT_FAILED
;
if
(
res
.
startNodes
(
&
master
,
1
))
return
NDBT_FAILED
;
if
(
res
.
waitClusterStarted
())
if
(
res
.
waitClusterStarted
())
return
NDBT_FAILED
;
return
NDBT_FAILED
;
...
@@ -2205,6 +2250,9 @@ TESTCASE("Bug28717", ""){
...
@@ -2205,6 +2250,9 @@ TESTCASE("Bug28717", ""){
TESTCASE
(
"Bug29364"
,
""
){
TESTCASE
(
"Bug29364"
,
""
){
INITIALIZER
(
runBug29364
);
INITIALIZER
(
runBug29364
);
}
}
TESTCASE
(
"Bug32160"
,
""
){
INITIALIZER
(
runBug32160
);
}
NDBT_TESTSUITE_END
(
testNodeRestart
);
NDBT_TESTSUITE_END
(
testNodeRestart
);
int
main
(
int
argc
,
const
char
**
argv
){
int
main
(
int
argc
,
const
char
**
argv
){
...
...
storage/ndb/test/run-test/daily-basic-tests.txt
View file @
4a4425cc
...
@@ -581,6 +581,10 @@ max-time: 1000
...
@@ -581,6 +581,10 @@ max-time: 1000
cmd: testNodeRestart
cmd: testNodeRestart
args: -n Bug29364 T1
args: -n Bug29364 T1
max-time: 300
cmd: testNodeRestart
args: -n Bug32160 T1
#
#
# DICT TESTS
# DICT TESTS
max-time: 500
max-time: 500
...
...
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