ndb - bug#20185

  update test prg + fix typo
parent 97df411f
...@@ -7093,7 +7093,7 @@ Dbtc::nodeFailCheckTransactions(Signal* signal, ...@@ -7093,7 +7093,7 @@ Dbtc::nodeFailCheckTransactions(Signal* signal,
for (transPtr.i = transPtrI; transPtr.i < capiConnectFilesize; transPtr.i++) for (transPtr.i = transPtrI; transPtr.i < capiConnectFilesize; transPtr.i++)
{ {
ptrCheckGuard(transPtr, capiConnectFilesize, apiConnectRecord); ptrCheckGuard(transPtr, capiConnectFilesize, apiConnectRecord);
Uiint32 state = transPtr.p->apiConnectstate; Uint32 state = transPtr.p->apiConnectstate;
if (transPtr.p->m_transaction_nodes.get(failedNodeId)) if (transPtr.p->m_transaction_nodes.get(failedNodeId))
{ {
jam(); jam();
......
...@@ -879,12 +879,15 @@ int runBug20185(NDBT_Context* ctx, NDBT_Step* step){ ...@@ -879,12 +879,15 @@ int runBug20185(NDBT_Context* ctx, NDBT_Step* step){
HugoOperations hugoOps(*ctx->getTab()); HugoOperations hugoOps(*ctx->getTab());
Ndb* pNdb = GETNDB(step); Ndb* pNdb = GETNDB(step);
const int masterNode = restarter.getMasterNodeId();
int dump[] = { 7090, 20 } ; int dump[] = { 7090, 20 } ;
if (restarter.dumpStateAllNodes(dump, 2)) if (restarter.dumpStateAllNodes(dump, 2))
return NDBT_FAILED; return NDBT_FAILED;
NdbSleep_MilliSleep(3000); NdbSleep_MilliSleep(3000);
retry:
if(hugoOps.startTransaction(pNdb) != 0) if(hugoOps.startTransaction(pNdb) != 0)
return NDBT_FAILED; return NDBT_FAILED;
...@@ -894,8 +897,14 @@ int runBug20185(NDBT_Context* ctx, NDBT_Step* step){ ...@@ -894,8 +897,14 @@ int runBug20185(NDBT_Context* ctx, NDBT_Step* step){
if (hugoOps.execute_NoCommit(pNdb) != 0) if (hugoOps.execute_NoCommit(pNdb) != 0)
return NDBT_FAILED; return NDBT_FAILED;
int nodeId;
const int node = hugoOps.getTransaction()->getConnectedNodeId(); const int node = hugoOps.getTransaction()->getConnectedNodeId();
if (node != masterNode)
{
hugoOps.closeTransaction(pNdb);
goto retry;
}
int nodeId;
do { do {
nodeId = restarter.getDbNodeId(rand() % restarter.getNumDbNodes()); nodeId = restarter.getDbNodeId(rand() % restarter.getNumDbNodes());
} while (nodeId == node); } while (nodeId == node);
......
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