mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 05:22:25 +01:00
BUG#3963
This commit is contained in:
parent
e18b384b64
commit
496ad0c3d7
5 changed files with 53 additions and 32 deletions
|
@ -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,
|
||||||
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,
|
||||||
Uint32 nodeId,
|
Uint32 nodeId,
|
||||||
Uint32 startBucket)
|
Uint32 startBucket)
|
||||||
{
|
{
|
||||||
CommitAckMarkerIterator iter;
|
TcFailRecordPtr node_fail_ptr;
|
||||||
if(startBucket == RNIL){
|
node_fail_ptr.i = 0;
|
||||||
|
ptrAss(node_fail_ptr, tcFailRecord);
|
||||||
|
if(node_fail_ptr.p->failStatus != FS_IDLE) {
|
||||||
jam();
|
jam();
|
||||||
capiConnectClosing[nodeId]++;
|
DEBUG("Restarting removeMarkerForFailedAPI");
|
||||||
m_commitAckMarkerHash.next(0, iter);
|
/**
|
||||||
} else {
|
* TC take-over in progress
|
||||||
jam();
|
* needs to restart as this
|
||||||
m_commitAckMarkerHash.next(startBucket, iter);
|
* 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,
|
||||||
/**
|
/**
|
||||||
* 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,
|
||||||
*
|
*
|
||||||
* 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){
|
||||||
}
|
}
|
||||||
|
|
||||||
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)
|
||||||
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
|
||||||
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){
|
||||||
/**
|
/**
|
||||||
* 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;
|
||||||
|
|
Loading…
Reference in a new issue