mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
ndb - bug#18385
Partial system restart, can not try to start with higher GCI that own even if knowing about a higher number ndb/include/kernel/signaldata/DumpStateOrd.hpp: Add new dump for setting time between gcp ndb/include/kernel/signaldata/StartPerm.hpp: Move error codes into StartPerm + Add new error code ndb/src/kernel/blocks/ERROR_codes.txt: Add new error insert ndb/src/kernel/blocks/dbdih/Dbdih.hpp: Move error codes into StartPerm + Add new error code ndb/src/kernel/blocks/dbdih/DbdihMain.cpp: Fix so that we don't try to restart to a too new GCI when doing a partial start Add new error code when this node later tries to join ndb/test/include/NdbRestarter.hpp: Add new method for selecting random node ndb/test/ndbapi/testSystemRestart.cpp: Add new testcase for bug#18385 ndb/test/run-test/daily-basic-tests.txt: Run test in daily-basic ndb/test/src/NdbRestarter.cpp: Add new method for selecting random node
This commit is contained in:
@@ -1051,6 +1051,52 @@ int runSystemRestart9(NDBT_Context* ctx, NDBT_Step* step){
|
||||
return result;
|
||||
}
|
||||
|
||||
int runBug18385(NDBT_Context* ctx, NDBT_Step* step){
|
||||
NdbRestarter restarter;
|
||||
const Uint32 nodeCount = restarter.getNumDbNodes();
|
||||
if(nodeCount < 2){
|
||||
g_info << "Bug18385 - Needs atleast 2 nodes to test" << endl;
|
||||
return NDBT_OK;
|
||||
}
|
||||
|
||||
int node1 = restarter.getDbNodeId(rand() % nodeCount);
|
||||
int node2 = restarter.getRandomNodeSameNodeGroup(node1, rand());
|
||||
|
||||
if (node1 == -1 || node2 == -1)
|
||||
return NDBT_OK;
|
||||
|
||||
int dump[] = { DumpStateOrd::DihSetTimeBetweenGcp, 300 };
|
||||
|
||||
int result = NDBT_OK;
|
||||
do {
|
||||
CHECK(restarter.dumpStateAllNodes(dump, 2) == 0);
|
||||
CHECK(restarter.restartOneDbNode(node1, false, true, false) == 0);
|
||||
NdbSleep_SecSleep(3);
|
||||
CHECK(restarter.restartAll(false, true, false) == 0);
|
||||
|
||||
Uint32 cnt = 0;
|
||||
int nodes[128];
|
||||
for(Uint32 i = 0; i<nodeCount; i++)
|
||||
if ((nodes[cnt] = restarter.getDbNodeId(i)) != node2)
|
||||
cnt++;
|
||||
|
||||
assert(cnt == nodeCount - 1);
|
||||
|
||||
CHECK(restarter.startNodes(nodes, cnt) == 0);
|
||||
CHECK(restarter.waitNodesStarted(nodes, cnt, 300) == 0);
|
||||
|
||||
CHECK(restarter.insertErrorInNode(node2, 7170) == 0);
|
||||
CHECK(restarter.waitNodesNoStart(&node2, 1) == 0);
|
||||
CHECK(restarter.restartOneDbNode(node2, true, false, true) == 0);
|
||||
CHECK(restarter.waitNodesStarted(&node2, 1) == 0);
|
||||
|
||||
} while(0);
|
||||
|
||||
g_info << "Bug18385 finished" << endl;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
int runWaitStarted(NDBT_Context* ctx, NDBT_Step* step){
|
||||
|
||||
NdbRestarter restarter;
|
||||
@@ -1234,6 +1280,13 @@ TESTCASE("SR9",
|
||||
STEP(runSystemRestart9);
|
||||
FINALIZER(runClearTable);
|
||||
}
|
||||
TESTCASE("Bug18385",
|
||||
"Perform partition system restart with other nodes with higher GCI"){
|
||||
INITIALIZER(runWaitStarted);
|
||||
INITIALIZER(runClearTable);
|
||||
STEP(runBug18385);
|
||||
FINALIZER(runClearTable);
|
||||
}
|
||||
NDBT_TESTSUITE_END(testSystemRestart);
|
||||
|
||||
int main(int argc, const char** argv){
|
||||
|
||||
Reference in New Issue
Block a user