ndb - bug#24543

  Resend if master dies during alloc node id
parent 32f4f890
...@@ -21,6 +21,9 @@ Crash president when he starts to run in ArbitState 1-9. ...@@ -21,6 +21,9 @@ Crash president when he starts to run in ArbitState 1-9.
910: Crash new president after node crash 910: Crash new president after node crash
934 : Crash president in ALLOC_NODE_ID_REQ
ERROR CODES FOR TESTING NODE FAILURE, GLOBAL CHECKPOINT HANDLING: ERROR CODES FOR TESTING NODE FAILURE, GLOBAL CHECKPOINT HANDLING:
----------------------------------------------------------------- -----------------------------------------------------------------
......
...@@ -4832,6 +4832,11 @@ Qmgr::execALLOC_NODEID_REQ(Signal * signal) ...@@ -4832,6 +4832,11 @@ Qmgr::execALLOC_NODEID_REQ(Signal * signal)
return; return;
} }
if (ERROR_INSERTED(934) && nodeId != getOwnNodeId())
{
CRASH_INSERTION(934);
}
opAllocNodeIdReq.m_req = *req; opAllocNodeIdReq.m_req = *req;
opAllocNodeIdReq.m_error = 0; opAllocNodeIdReq.m_error = 0;
opAllocNodeIdReq.m_connectCount = getNodeInfo(refToNode(senderRef)).m_connectCount; 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) ...@@ -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); ndbout_c("Node %d fail completed", rep->failedNodeId);
#endif #endif
if (rep->failedNodeId == nodeId) if (rep->failedNodeId == nodeId)
{
do_send = 1;
nodeId = 0; nodeId = 0;
}
continue; continue;
} }
case GSN_NODE_FAILREP:{ case GSN_NODE_FAILREP:{
......
...@@ -966,6 +966,37 @@ runBug21271(NDBT_Context* ctx, NDBT_Step* step){ ...@@ -966,6 +966,37 @@ runBug21271(NDBT_Context* ctx, NDBT_Step* step){
return NDBT_OK; 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); NDBT_TESTSUITE(testNodeRestart);
TESTCASE("NoLoad", TESTCASE("NoLoad",
...@@ -1279,6 +1310,10 @@ TESTCASE("Bug20185", ...@@ -1279,6 +1310,10 @@ TESTCASE("Bug20185",
STEP(runBug20185); STEP(runBug20185);
FINALIZER(runClearTable); FINALIZER(runClearTable);
} }
TESTCASE("Bug24543", "")
{
INITIALIZER(runBug24543);
}
TESTCASE("Bug21271", TESTCASE("Bug21271",
""){ ""){
INITIALIZER(runLoadTable); INITIALIZER(runLoadTable);
......
...@@ -744,6 +744,10 @@ max-time: 1000 ...@@ -744,6 +744,10 @@ max-time: 1000
cmd: testSRBank cmd: testSRBank
args: -n Mix -l 300 -r 15 T1 args: -n Mix -l 300 -r 15 T1
max-time: 300
cmd: testNodeRestart
args: -n Bug24543 T1
# OLD FLEX # OLD FLEX
max-time: 500 max-time: 500
cmd: flexBench cmd: flexBench
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment