Commit 011cc5c9 authored by unknown's avatar unknown

wl1801 - more node failure handling in simple/dirty read


ndb/include/kernel/signaldata/TcContinueB.hpp:
  Test NODE_FAILREP arraving before TCKEYCONF w.r.t simple/dirty read
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  Test NODE_FAILREP arraving before TCKEYCONF w.r.t simple/dirty read
ndb/src/ndbapi/NdbConnection.cpp:
  Test NODE_FAILREP arraving before TCKEYCONF w.r.t simple/dirty read
ndb/src/ndbapi/Ndbif.cpp:
  Test NODE_FAILREP arraving before TCKEYCONF w.r.t simple/dirty read
ndb/test/ndbapi/testNodeRestart.cpp:
  Test NODE_FAILREP arraving before TCKEYCONF w.r.t simple/dirty read
parent 44e30660
......@@ -42,7 +42,9 @@ private:
ZWAIT_ABORT_ALL = 14,
ZCHECK_SCAN_ACTIVE_FAILED_LQH = 15,
CHECK_WAIT_DROP_TAB_FAILED_LQH = 16,
TRIGGER_PENDING = 17
TRIGGER_PENDING = 17,
DelayTCKEYCONF = 18
};
};
......
......@@ -274,6 +274,12 @@ void Dbtc::execCONTINUEB(Signal* signal)
transPtr.p->triggerPending = false;
executeTriggers(signal, &transPtr);
return;
case TcContinueB::DelayTCKEYCONF:
jam();
apiConnectptr.i = Tdata0;
ptrCheckGuard(apiConnectptr, capiConnectFilesize, apiConnectRecord);
sendtckeyconf(signal, Tdata1);
return;
default:
ndbrequire(false);
}//switch
......@@ -2972,7 +2978,7 @@ void Dbtc::tckeyreq050Lab(Signal* signal)
regTcPtr->tcNodedata[0] = Tnode;
}//if
}//for
if(ERROR_INSERTED(8048))
if(ERROR_INSERTED(8048) || ERROR_INSERTED(8049))
{
for (Tindex = 0; Tindex <= tnoOfBackup; Tindex++)
{
......@@ -2981,6 +2987,7 @@ void Dbtc::tckeyreq050Lab(Signal* signal)
if (Tnode != TownNode) {
jam();
regTcPtr->tcNodedata[0] = Tnode;
ndbout_c("Choosing %d", Tnode);
}//if
}//for
}
......@@ -3833,6 +3840,15 @@ Dbtc::lqhKeyConf_checkTransactionState(Signal * signal,
void Dbtc::sendtckeyconf(Signal* signal, UintR TcommitFlag)
{
if(ERROR_INSERTED(8049)){
CLEAR_ERROR_INSERT_VALUE;
signal->theData[0] = TcContinueB::DelayTCKEYCONF;
signal->theData[1] = apiConnectptr.i;
signal->theData[2] = TcommitFlag;
sendSignalWithDelay(cownref, GSN_CONTINUEB, signal, 3000, 3);
return;
}
HostRecordPtr localHostptr;
ApiConnectRecord * const regApiPtr = apiConnectptr.p;
const UintR TopWords = (UintR)regApiPtr->tckeyrec;
......
......@@ -1548,6 +1548,7 @@ from other transactions.
{
done = 1;
tOp->setErrorCode(4119);
theCompletionStatus = CompletedFailure;
}
}
tNoComp += done;
......
......@@ -304,8 +304,8 @@ Ndb::abortTransactionsAfterNodeFailure(Uint16 aNodeId)
localCon->theCommitStatus = NdbConnection::Aborted;
localCon->theReleaseOnClose = true;
completedTransaction(localCon);
}
else if(localCon->report_node_failure(aNodeId));
}
else if(localCon->report_node_failure(aNodeId))
{
completedTransaction(localCon);
}
......
......@@ -311,8 +311,8 @@ int runDirtyRead(NDBT_Context* ctx, NDBT_Step* step){
int id = i % restarter.getNumDbNodes();
int nodeId = restarter.getDbNodeId(id);
ndbout << "Restart node " << nodeId << endl;
restarter.insertErrorInNode(nodeId, 5041);
restarter.insertErrorInAllNodes(8048);
restarter.insertErrorInAllNodes(5041);
restarter.insertErrorInAllNodes(8048 + (i & 1));
for(int j = 0; j<records; j++){
if(hugoOps.startTransaction(pNdb) != 0)
......
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