mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 13:32:33 +01:00
ndb - bug#24543
Resend if master dies during alloc node id
This commit is contained in:
parent
32f4f8908e
commit
60b19639b9
5 changed files with 50 additions and 0 deletions
|
@ -21,6 +21,9 @@ Crash president when he starts to run in ArbitState 1-9.
|
|||
|
||||
910: Crash new president after node crash
|
||||
|
||||
934 : Crash president in ALLOC_NODE_ID_REQ
|
||||
|
||||
|
||||
ERROR CODES FOR TESTING NODE FAILURE, GLOBAL CHECKPOINT HANDLING:
|
||||
-----------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -4832,6 +4832,11 @@ Qmgr::execALLOC_NODEID_REQ(Signal * signal)
|
|||
return;
|
||||
}
|
||||
|
||||
if (ERROR_INSERTED(934) && nodeId != getOwnNodeId())
|
||||
{
|
||||
CRASH_INSERTION(934);
|
||||
}
|
||||
|
||||
opAllocNodeIdReq.m_req = *req;
|
||||
opAllocNodeIdReq.m_error = 0;
|
||||
opAllocNodeIdReq.m_connectCount = getNodeInfo(refToNode(senderRef)).m_connectCount;
|
||||
|
|
|
@ -2051,7 +2051,10 @@ MgmtSrvr::alloc_node_id_req(NodeId free_node_id, enum ndb_mgm_node_type type)
|
|||
ndbout_c("Node %d fail completed", rep->failedNodeId);
|
||||
#endif
|
||||
if (rep->failedNodeId == nodeId)
|
||||
{
|
||||
do_send = 1;
|
||||
nodeId = 0;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
case GSN_NODE_FAILREP:{
|
||||
|
|
|
@ -966,6 +966,37 @@ runBug21271(NDBT_Context* ctx, NDBT_Step* step){
|
|||
return NDBT_OK;
|
||||
}
|
||||
|
||||
int
|
||||
runBug24543(NDBT_Context* ctx, NDBT_Step* step){
|
||||
NdbRestarter restarter;
|
||||
|
||||
int val2[] = { DumpStateOrd::CmvmiSetRestartOnErrorInsert, 1 };
|
||||
if (restarter.dumpStateAllNodes(val2, 2))
|
||||
return NDBT_FAILED;
|
||||
|
||||
int nodes[2];
|
||||
nodes[0] = restarter.getMasterNodeId();
|
||||
restarter.insertErrorInNode(nodes[0], 934);
|
||||
|
||||
nodes[1] = restarter.getRandomNodeOtherNodeGroup(nodes[0], rand());
|
||||
if (nodes[1] == -1)
|
||||
{
|
||||
nodes[1] = restarter.getRandomNodeSameNodeGroup(nodes[0], rand());
|
||||
}
|
||||
|
||||
restarter.restartOneDbNode(nodes[1], false, true, true);
|
||||
if (restarter.waitNodesNoStart(nodes, 2))
|
||||
return NDBT_FAILED;
|
||||
|
||||
restarter.startNodes(nodes, 2);
|
||||
if (restarter.waitNodesStarted(nodes, 2))
|
||||
{
|
||||
return NDBT_FAILED;
|
||||
}
|
||||
|
||||
return NDBT_OK;
|
||||
}
|
||||
|
||||
|
||||
NDBT_TESTSUITE(testNodeRestart);
|
||||
TESTCASE("NoLoad",
|
||||
|
@ -1279,6 +1310,10 @@ TESTCASE("Bug20185",
|
|||
STEP(runBug20185);
|
||||
FINALIZER(runClearTable);
|
||||
}
|
||||
TESTCASE("Bug24543", "")
|
||||
{
|
||||
INITIALIZER(runBug24543);
|
||||
}
|
||||
TESTCASE("Bug21271",
|
||||
""){
|
||||
INITIALIZER(runLoadTable);
|
||||
|
|
|
@ -744,6 +744,10 @@ max-time: 1000
|
|||
cmd: testSRBank
|
||||
args: -n Mix -l 300 -r 15 T1
|
||||
|
||||
max-time: 300
|
||||
cmd: testNodeRestart
|
||||
args: -n Bug24543 T1
|
||||
|
||||
# OLD FLEX
|
||||
max-time: 500
|
||||
cmd: flexBench
|
||||
|
|
Loading…
Reference in a new issue