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
13bb3c55
Commit
13bb3c55
authored
Dec 08, 2005
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug#15587 - ndb
Fix error in NF during NR
parent
bfb8a71f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
74 additions
and
4 deletions
+74
-4
ndb/include/kernel/signaldata/DumpStateOrd.hpp
ndb/include/kernel/signaldata/DumpStateOrd.hpp
+2
-0
ndb/src/kernel/blocks/ERROR_codes.txt
ndb/src/kernel/blocks/ERROR_codes.txt
+3
-0
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
+12
-2
ndb/src/kernel/blocks/dblqh/Dblqh.hpp
ndb/src/kernel/blocks/dblqh/Dblqh.hpp
+1
-0
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
+7
-2
ndb/test/ndbapi/testNodeRestart.cpp
ndb/test/ndbapi/testNodeRestart.cpp
+45
-0
ndb/test/run-test/daily-basic-tests.txt
ndb/test/run-test/daily-basic-tests.txt
+4
-0
No files found.
ndb/include/kernel/signaldata/DumpStateOrd.hpp
View file @
13bb3c55
...
...
@@ -78,6 +78,8 @@ public:
LqhDumpAllScanRec
=
2301
,
LqhDumpAllActiveScanRec
=
2302
,
LqhDumpLcpState
=
2303
,
LqhErrorInsert5042
=
2315
,
AccDumpOneScanRec
=
2400
,
AccDumpAllScanRec
=
2401
,
AccDumpAllActiveScanRec
=
2402
,
...
...
ndb/src/kernel/blocks/ERROR_codes.txt
View file @
13bb3c55
...
...
@@ -155,6 +155,9 @@ Insert node failure handling when receiving COMPLETEREQ.
5006:
Insert node failure handling when receiving ABORTREQ.
5042:
As 5002, but with specified table (see DumpStateOrd)
These error code can be combined with error codes for testing time-out
handling in DBTC to ensure that node failures are also well handled in
time-out handling. They can also be used to test multiple node failure
...
...
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
View file @
13bb3c55
...
...
@@ -5187,15 +5187,16 @@ void Dbdih::removeNodeFromTable(Signal* signal,
/**
* For each of replica record
*/
Uint32
replicaNo
=
0
;
bool
found
=
false
;
ReplicaRecordPtr
replicaPtr
;
for
(
replicaPtr
.
i
=
fragPtr
.
p
->
storedReplicas
;
replicaPtr
.
i
!=
RNIL
;
replicaPtr
.
i
=
replicaPtr
.
p
->
nextReplica
,
replicaNo
++
)
{
replicaPtr
.
i
=
replicaPtr
.
p
->
nextReplica
)
{
jam
();
ptrCheckGuard
(
replicaPtr
,
creplicaFileSize
,
replicaRecord
);
if
(
replicaPtr
.
p
->
procNode
==
nodeId
){
jam
();
found
=
true
;
noOfRemovedReplicas
++
;
removeNodeFromStored
(
nodeId
,
fragPtr
,
replicaPtr
);
if
(
replicaPtr
.
p
->
lcpOngoingFlag
){
...
...
@@ -5211,6 +5212,15 @@ void Dbdih::removeNodeFromTable(Signal* signal,
}
}
}
if
(
!
found
)
{
jam
();
/**
* Run updateNodeInfo to remove any dead nodes from list of activeNodes
* see bug#15587
*/
updateNodeInfo
(
fragPtr
);
}
noOfRemainingLcpReplicas
+=
fragPtr
.
p
->
noLcpReplicas
;
}
...
...
ndb/src/kernel/blocks/dblqh/Dblqh.hpp
View file @
13bb3c55
...
...
@@ -2881,6 +2881,7 @@ private:
UintR
ctransidHash
[
1024
];
Uint32
c_diskless
;
Uint32
c_error_insert_table_id
;
public:
/**
...
...
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
View file @
13bb3c55
...
...
@@ -3532,6 +3532,7 @@ void Dblqh::execLQHKEYREQ(Signal* signal)
jam
();
regTcPtr
->
activeCreat
=
ZTRUE
;
CRASH_INSERTION
(
5002
);
CRASH_INSERTION2
(
5042
,
tabptr
.
i
==
c_error_insert_table_id
);
}
else
{
regTcPtr
->
activeCreat
=
ZFALSE
;
}
//if
...
...
@@ -18402,8 +18403,12 @@ Dblqh::execDUMP_STATE_ORD(Signal* signal)
return
;
}
if
(
dumpState
->
args
[
0
]
==
DumpStateOrd
::
LqhErrorInsert5042
&&
signal
->
getLength
()
==
2
)
{
c_error_insert_table_id
=
dumpState
->
args
[
1
];
SET_ERROR_INSERT_VALUE
(
5042
);
}
}
//Dblqh::execDUMP_STATE_ORD()
void
Dblqh
::
execSET_VAR_REQ
(
Signal
*
signal
)
...
...
ndb/test/ndbapi/testNodeRestart.cpp
View file @
13bb3c55
...
...
@@ -21,6 +21,7 @@
#include <NdbRestarter.hpp>
#include <NdbRestarts.hpp>
#include <Vector.hpp>
#include <signaldata/DumpStateOrd.hpp>
int
runLoadTable
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
...
...
@@ -409,6 +410,43 @@ int runLateCommit(NDBT_Context* ctx, NDBT_Step* step){
return
NDBT_OK
;
}
int
runBug15587
(
NDBT_Context
*
ctx
,
NDBT_Step
*
step
){
int
result
=
NDBT_OK
;
int
loops
=
ctx
->
getNumLoops
();
int
records
=
ctx
->
getNumRecords
();
NdbRestarter
restarter
;
Uint32
tableId
=
ctx
->
getTab
()
->
getTableId
();
int
dump
[
2
]
=
{
DumpStateOrd
::
LqhErrorInsert5042
,
0
};
dump
[
1
]
=
tableId
;
int
nodeId
=
restarter
.
getDbNodeId
(
1
);
ndbout
<<
"Restart node "
<<
nodeId
<<
endl
;
if
(
restarter
.
restartOneDbNode
(
nodeId
,
/** initial */
false
,
/** nostart */
true
,
/** abort */
true
))
return
NDBT_FAILED
;
if
(
restarter
.
waitNodesNoStart
(
&
nodeId
,
1
))
return
NDBT_FAILED
;
if
(
restarter
.
dumpStateOneNode
(
nodeId
,
dump
,
2
))
return
NDBT_FAILED
;
if
(
restarter
.
startNodes
(
&
nodeId
,
1
))
return
NDBT_FAILED
;
if
(
restarter
.
waitNodesStarted
(
&
nodeId
,
1
))
return
NDBT_FAILED
;
ctx
->
stopTest
();
return
NDBT_OK
;
}
NDBT_TESTSUITE
(
testNodeRestart
);
TESTCASE
(
"NoLoad"
,
"Test that one node at a time can be stopped and then restarted "
\
...
...
@@ -671,6 +709,13 @@ TESTCASE("LateCommit",
STEP
(
runLateCommit
);
FINALIZER
(
runClearTable
);
}
TESTCASE
(
"Bug15587"
,
"Test bug with NF during NR"
){
INITIALIZER
(
runLoadTable
);
STEP
(
runScanUpdateUntilStopped
);
STEP
(
runBug15587
);
FINALIZER
(
runClearTable
);
}
NDBT_TESTSUITE_END
(
testNodeRestart
);
int
main
(
int
argc
,
const
char
**
argv
){
...
...
ndb/test/run-test/daily-basic-tests.txt
View file @
13bb3c55
...
...
@@ -434,6 +434,10 @@ max-time: 500
cmd: testScan
args: -l 100 -n Scan-bug8262 T7
max-time: 500
cmd: testNodeRestart
args: -n BugBug15587 T1
# OLD FLEX
max-time: 500
cmd: flexBench
...
...
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