mirror of
https://github.com/MariaDB/server.git
synced 2025-02-01 03:21:53 +01:00
ndb - bug#20185
update test prg + fix typo storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: compile error storage/ndb/test/ndbapi/testNodeRestart.cpp: upgrade test prg not to kill master node as master take over wont work with all these dealyed GCP_PREPARE
This commit is contained in:
parent
d411a684bb
commit
3f950c925e
2 changed files with 12 additions and 3 deletions
|
@ -7093,7 +7093,7 @@ Dbtc::nodeFailCheckTransactions(Signal* signal,
|
|||
for (transPtr.i = transPtrI; transPtr.i < capiConnectFilesize; transPtr.i++)
|
||||
{
|
||||
ptrCheckGuard(transPtr, capiConnectFilesize, apiConnectRecord);
|
||||
Uiint32 state = transPtr.p->apiConnectstate;
|
||||
Uint32 state = transPtr.p->apiConnectstate;
|
||||
if (transPtr.p->m_transaction_nodes.get(failedNodeId))
|
||||
{
|
||||
jam();
|
||||
|
|
|
@ -879,12 +879,15 @@ int runBug20185(NDBT_Context* ctx, NDBT_Step* step){
|
|||
HugoOperations hugoOps(*ctx->getTab());
|
||||
Ndb* pNdb = GETNDB(step);
|
||||
|
||||
const int masterNode = restarter.getMasterNodeId();
|
||||
|
||||
int dump[] = { 7090, 20 } ;
|
||||
if (restarter.dumpStateAllNodes(dump, 2))
|
||||
return NDBT_FAILED;
|
||||
|
||||
NdbSleep_MilliSleep(3000);
|
||||
|
||||
|
||||
retry:
|
||||
if(hugoOps.startTransaction(pNdb) != 0)
|
||||
return NDBT_FAILED;
|
||||
|
||||
|
@ -894,8 +897,14 @@ int runBug20185(NDBT_Context* ctx, NDBT_Step* step){
|
|||
if (hugoOps.execute_NoCommit(pNdb) != 0)
|
||||
return NDBT_FAILED;
|
||||
|
||||
int nodeId;
|
||||
const int node = hugoOps.getTransaction()->getConnectedNodeId();
|
||||
if (node != masterNode)
|
||||
{
|
||||
hugoOps.closeTransaction(pNdb);
|
||||
goto retry;
|
||||
}
|
||||
|
||||
int nodeId;
|
||||
do {
|
||||
nodeId = restarter.getDbNodeId(rand() % restarter.getNumDbNodes());
|
||||
} while (nodeId == node);
|
||||
|
|
Loading…
Add table
Reference in a new issue