Skip to content

Commit fc9b1bb

Browse files
committed
Bug#37030426 AT: testNodeRestart -n Bug58453 T1 fails in .4node4rpl
due to error insert leftover Patch for 7.6 only. Test fail in 4node4rpl setup only. Test checks that, during TC takeover, surviving nodes are not affected by any transactions being commit/complete in parallel with the handling of LQH_TRANSREQ/CONF signals send/received by the node that is taking over. Problem: 1 - In a single node group setup (e.g 4node4rpl), if there is a node fail handling in progress there will be no transactions being commit/complete in parallel with the takeover, so conditions to run the test are not met. 2 - If number of replicas is < 2 there will be no nodes in same node group as taking over node to send LQH_TRANSREQ to 'new' TC node. Solution: 1 - Skip test when number of node groups is < 2. 2 - Skip test when number of replicas is < 2. Change-Id: Ia091f7c24fec16560b3adff6f13ed8b148566ead
1 parent 1acded3 commit fc9b1bb

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

storage/ndb/test/include/NdbRestarter.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2003, 2023, Oracle and/or its affiliates.
2+
Copyright (c) 2003, 2024, Oracle and/or its affiliates.
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License, version 2.0,
@@ -122,6 +122,7 @@ class NdbRestarter {
122122
int getNextMasterNodeId(int nodeId);
123123
int getNodeGroup(int nodeId);
124124
int getNodeGroups(Vector<int>& node_groups, int * max_alive_replicas_ptr = NULL);
125+
int getNumNodeGroups();
125126
int getNumReplicas();
126127
int getRandomNodeSameNodeGroup(int nodeId, int randomNumber);
127128
int getRandomNodeOtherNodeGroup(int nodeId, int randomNumber);

storage/ndb/test/ndbapi/testNodeRestart.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5311,10 +5311,13 @@ int
53115311
runBug58453(NDBT_Context* ctx, NDBT_Step* step)
53125312
{
53135313
NdbRestarter res;
5314-
if (res.getNumDbNodes() < 4)
5315-
{
5316-
g_err << "[SKIPPED] Test skipped. Requires at least 4 nodes" << endl;
5317-
return NDBT_OK;
5314+
if (res.getNumReplicas() < 2) {
5315+
g_err << "[SKIPPED] Test skipped. Requires at least 2 Replicas" << endl;
5316+
return NDBT_SKIPPED;
5317+
}
5318+
if (res.getNumNodeGroups() < 2) {
5319+
g_err << "[SKIPPED] Test skipped. Requires at least 2 Node Groups" << endl;
5320+
return NDBT_SKIPPED;
53185321
}
53195322

53205323
Ndb* pNdb = GETNDB(step);

storage/ndb/test/src/NdbRestarter.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,11 @@ NdbRestarter::getNodeGroups(Vector<int>& node_groups, int * max_alive_replicas_p
259259
return 0;
260260
}
261261

262+
int NdbRestarter::getNumNodeGroups() {
263+
Vector<int> node_group_list;
264+
return getNodeGroups(node_group_list);
265+
}
266+
262267
int NdbRestarter::getNumReplicas()
263268
{
264269
Vector<int> node_group_list;

0 commit comments

Comments
 (0)