Commit 715158b7 authored by unknown's avatar unknown

BUG#3963


ndb/src/kernel/blocks/dbtc/Dbtc.hpp:
  let sendTCKEY_FAILCONF reset marker
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  1) let sendTCKEY_FAILCONF reset marker
  2) Restart marker scan on NF
  3) Don't send TCKEY_FAILCONF to 0
ndb/src/mgmapi/mgmapi.cpp:
  More info from mgmapi
ndb/test/run-test/daily-basic-tests.txt:
  drop tables to fix -n MassiveRollback
ndb/test/run-test/main.cpp:
  More error messages (and retries) on error
parent abf8c93d
...@@ -1391,7 +1391,7 @@ private: ...@@ -1391,7 +1391,7 @@ private:
void sendCompleteLqh(Signal* signal, void sendCompleteLqh(Signal* signal,
TcConnectRecord * const regTcPtr); TcConnectRecord * const regTcPtr);
void sendTCKEY_FAILREF(Signal* signal, const ApiConnectRecord *); void sendTCKEY_FAILREF(Signal* signal, const ApiConnectRecord *);
void sendTCKEY_FAILCONF(Signal* signal, const ApiConnectRecord *); void sendTCKEY_FAILCONF(Signal* signal, ApiConnectRecord *);
void checkStartTimeout(Signal* signal); void checkStartTimeout(Signal* signal);
void checkStartFragTimeout(Signal* signal); void checkStartFragTimeout(Signal* signal);
void timeOutFoundFragLab(Signal* signal, Uint32 TscanConPtr); void timeOutFoundFragLab(Signal* signal, Uint32 TscanConPtr);
......
...@@ -1048,13 +1048,12 @@ Dbtc::handleFailedApiNode(Signal* signal, ...@@ -1048,13 +1048,12 @@ Dbtc::handleFailedApiNode(Signal* signal,
apiConnectptr.i++; apiConnectptr.i++;
if (apiConnectptr.i > ((capiConnectFilesize / 3) - 1)) { if (apiConnectptr.i > ((capiConnectFilesize / 3) - 1)) {
jam(); jam();
capiConnectClosing[TapiFailedNode]--;
/** /**
* Finished with scanning connection record * Finished with scanning connection record
* *
* Now scan markers * Now scan markers
*/ */
removeMarkerForFailedAPI(signal, TapiFailedNode, RNIL); // RNIL = first removeMarkerForFailedAPI(signal, TapiFailedNode, 0);
return; return;
}//if }//if
} while (TloopCount++ < 256); } while (TloopCount++ < 256);
...@@ -1069,15 +1068,26 @@ Dbtc::removeMarkerForFailedAPI(Signal* signal, ...@@ -1069,15 +1068,26 @@ Dbtc::removeMarkerForFailedAPI(Signal* signal,
Uint32 nodeId, Uint32 nodeId,
Uint32 startBucket) Uint32 startBucket)
{ {
CommitAckMarkerIterator iter; TcFailRecordPtr node_fail_ptr;
if(startBucket == RNIL){ node_fail_ptr.i = 0;
jam(); ptrAss(node_fail_ptr, tcFailRecord);
capiConnectClosing[nodeId]++; if(node_fail_ptr.p->failStatus != FS_IDLE) {
m_commitAckMarkerHash.next(0, iter);
} else {
jam(); jam();
m_commitAckMarkerHash.next(startBucket, iter); DEBUG("Restarting removeMarkerForFailedAPI");
/**
* TC take-over in progress
* needs to restart as this
* creates new markers
*/
signal->theData[0] = TcContinueB::ZHANDLE_FAILED_API_NODE_REMOVE_MARKERS;
signal->theData[1] = nodeId;
signal->theData[2] = 0;
sendSignalWithDelay(cownref, GSN_CONTINUEB, signal, 500, 3);
return;
} }
CommitAckMarkerIterator iter;
m_commitAckMarkerHash.next(startBucket, iter);
const Uint32 RT_BREAK = 256; const Uint32 RT_BREAK = 256;
for(Uint32 i = 0; i<RT_BREAK || iter.bucket == startBucket; i++){ for(Uint32 i = 0; i<RT_BREAK || iter.bucket == startBucket; i++){
...@@ -1108,7 +1118,6 @@ Dbtc::removeMarkerForFailedAPI(Signal* signal, ...@@ -1108,7 +1118,6 @@ Dbtc::removeMarkerForFailedAPI(Signal* signal,
/** /**
* Check so that the record is not still in use * Check so that the record is not still in use
* *
* (This can happen when NF and API Fail happens at the same time)
*/ */
ApiConnectRecordPtr apiConnectPtr; ApiConnectRecordPtr apiConnectPtr;
apiConnectPtr.i = iter.curr.p->apiConnectPtr; apiConnectPtr.i = iter.curr.p->apiConnectPtr;
...@@ -1120,9 +1129,8 @@ Dbtc::removeMarkerForFailedAPI(Signal* signal, ...@@ -1120,9 +1129,8 @@ Dbtc::removeMarkerForFailedAPI(Signal* signal,
* *
* Don't remove it, but continueb instead * Don't remove it, but continueb instead
*/ */
break; break;
} }
sendRemoveMarkers(signal, iter.curr.p); sendRemoveMarkers(signal, iter.curr.p);
m_commitAckMarkerHash.release(iter.curr); m_commitAckMarkerHash.release(iter.curr);
...@@ -7327,25 +7335,23 @@ Dbtc::sendTCKEY_FAILREF(Signal* signal, const ApiConnectRecord * regApiPtr){ ...@@ -7327,25 +7335,23 @@ Dbtc::sendTCKEY_FAILREF(Signal* signal, const ApiConnectRecord * regApiPtr){
} }
void void
Dbtc::sendTCKEY_FAILCONF(Signal* signal, const ApiConnectRecord * regApiPtr){ Dbtc::sendTCKEY_FAILCONF(Signal* signal, ApiConnectRecord * regApiPtr){
jam(); jam();
TcKeyFailConf * const failConf = (TcKeyFailConf *)&signal->theData[0]; TcKeyFailConf * const failConf = (TcKeyFailConf *)&signal->theData[0];
if(regApiPtr->commitAckMarker == RNIL){ const Uint32 ref = regApiPtr->ndbapiBlockref;
jam(); const Uint32 marker = regApiPtr->commitAckMarker;
failConf->apiConnectPtr = regApiPtr->ndbapiConnect; if(ref != 0){
} else { failConf->apiConnectPtr = regApiPtr->ndbapiConnect | (marker != RNIL);
jam(); failConf->transId1 = regApiPtr->transid[0];
failConf->apiConnectPtr = regApiPtr->ndbapiConnect | 1; failConf->transId2 = regApiPtr->transid[1];
sendSignal(regApiPtr->ndbapiBlockref,
GSN_TCKEY_FAILCONF, signal, TcKeyFailConf::SignalLength, JBB);
} }
failConf->transId1 = regApiPtr->transid[0]; regApiPtr->commitAckMarker = RNIL;
failConf->transId2 = regApiPtr->transid[1];
sendSignal(regApiPtr->ndbapiBlockref,
GSN_TCKEY_FAILCONF, signal, TcKeyFailConf::SignalLength, JBB);
} }
/*------------------------------------------------------------*/ /*------------------------------------------------------------*/
/* THIS PART HANDLES THE ABORT PHASE IN THE CASE OF A */ /* THIS PART HANDLES THE ABORT PHASE IN THE CASE OF A */
/* NODE FAILURE BEFORE THE COMMIT DECISION. */ /* NODE FAILURE BEFORE THE COMMIT DECISION. */
......
...@@ -544,7 +544,7 @@ ndb_mgm_get_status(NdbMgmHandle handle) ...@@ -544,7 +544,7 @@ ndb_mgm_get_status(NdbMgmHandle handle)
buf[strlen(buf)-1] = '\0'; buf[strlen(buf)-1] = '\0';
if(strcmp("node status", buf) != 0) { if(strcmp("node status", buf) != 0) {
SET_ERROR(handle, NDB_MGM_ILLEGAL_NODE_STATUS, ""); SET_ERROR(handle, NDB_MGM_ILLEGAL_NODE_STATUS, buf);
return NULL; return NULL;
} }
......
...@@ -139,6 +139,10 @@ max-time: 500 ...@@ -139,6 +139,10 @@ max-time: 500
cmd: testBasicAsynch cmd: testBasicAsynch
args: -n PkDeleteAsynch args: -n PkDeleteAsynch
max-time:
cmd: ndb_drop_table
args: T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14
max-time: 500 max-time: 500
cmd: testBasic cmd: testBasic
args: -n MassiveRollback T1 T6 T13 args: -n MassiveRollback T1 T6 T13
......
...@@ -614,11 +614,22 @@ wait_ndb(atrt_config& config, int goal){ ...@@ -614,11 +614,22 @@ wait_ndb(atrt_config& config, int goal){
/** /**
* 1) retreive current state * 1) retreive current state
*/ */
state = ndb_mgm_get_status(handle); state = 0;
if(state == 0){ do {
g_logger.critical("Unable to poll db state"); state = ndb_mgm_get_status(handle);
return false; if(state == 0){
} const int err = ndb_mgm_get_latest_error(handle);
g_logger.error("Unable to poll db state: %d %s %s",
ndb_mgm_get_latest_error(handle),
ndb_mgm_get_latest_error_msg(handle),
ndb_mgm_get_latest_error_desc(handle));
if(err == NDB_MGM_SERVER_NOT_CONNECTED && connect_ndb_mgm(config)){
g_logger.error("Reconnected...");
continue;
}
return false;
}
} while(state == 0);
NdbAutoPtr<void> tmp(state); NdbAutoPtr<void> tmp(state);
min2 = goal; min2 = goal;
......
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