mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
ndb - bug#26457
master failure during master take over ndb/src/kernel/blocks/ERROR_codes.txt: new error code ndb/src/kernel/blocks/dbdih/DbdihMain.cpp: Make sure to clear NF_XX_LCP if master fails during master take-over ndb/test/include/NdbRestarter.hpp: Add support for querying next master and node group (for multi node failure testing) ndb/test/ndbapi/testNodeRestart.cpp: testcase ndb/test/run-test/daily-basic-tests.txt: testcase ndb/test/src/NdbRestarter.cpp: Add support for querying next master and node group (for multi node failure testing)
This commit is contained in:
@ -1045,6 +1045,45 @@ int runBug25554(NDBT_Context* ctx, NDBT_Step* step){
|
||||
return NDBT_OK;
|
||||
}
|
||||
|
||||
int
|
||||
runBug26457(NDBT_Context* ctx, NDBT_Step* step)
|
||||
{
|
||||
NdbRestarter res;
|
||||
if (res.getNumDbNodes() < 4)
|
||||
return NDBT_OK;
|
||||
|
||||
int loops = ctx->getNumLoops();
|
||||
while (loops --)
|
||||
{
|
||||
retry:
|
||||
int master = res.getMasterNodeId();
|
||||
int next = res.getNextMasterNodeId(master);
|
||||
|
||||
ndbout_c("master: %d next: %d", master, next);
|
||||
|
||||
if (res.getNodeGroup(master) == res.getNodeGroup(next))
|
||||
{
|
||||
res.restartOneDbNode(next, false, false, true);
|
||||
if (res.waitClusterStarted())
|
||||
return NDBT_FAILED;
|
||||
goto retry;
|
||||
}
|
||||
|
||||
int val2[] = { DumpStateOrd::CmvmiSetRestartOnErrorInsert, 2 };
|
||||
|
||||
if (res.dumpStateOneNode(next, val2, 2))
|
||||
return NDBT_FAILED;
|
||||
|
||||
if (res.insertErrorInNode(next, 7180))
|
||||
return NDBT_FAILED;
|
||||
|
||||
res.restartOneDbNode(master, false, false, true);
|
||||
if (res.waitClusterStarted())
|
||||
return NDBT_FAILED;
|
||||
}
|
||||
|
||||
return NDBT_OK;
|
||||
}
|
||||
|
||||
NDBT_TESTSUITE(testNodeRestart);
|
||||
TESTCASE("NoLoad",
|
||||
@ -1367,6 +1406,9 @@ TESTCASE("Bug25364", ""){
|
||||
TESTCASE("Bug25554", ""){
|
||||
INITIALIZER(runBug25554);
|
||||
}
|
||||
TESTCASE("Bug26457", ""){
|
||||
INITIALIZER(runBug26457);
|
||||
}
|
||||
NDBT_TESTSUITE_END(testNodeRestart);
|
||||
|
||||
int main(int argc, const char** argv){
|
||||
|
Reference in New Issue
Block a user