Commit dc4d8ec6 authored by unknown's avatar unknown

ndb - bug#26481 - fix of bug fix

  Make sure GCP_SAVEREQ is not allowed before START_RECCONF has been sent...START_RECREQ is not enough



storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
  Make sure GCP_SAVEREQ is not allowed before START_RECCONF has been sent...
  START_RECREQ is not enough
parent d8a5d43c
...@@ -440,6 +440,7 @@ void Dblqh::execCONTINUEB(Signal* signal) ...@@ -440,6 +440,7 @@ void Dblqh::execCONTINUEB(Signal* signal)
else else
{ {
jam(); jam();
cstartRecReq = 2;
ndbrequire(c_redo_complete_fragments.isEmpty()); ndbrequire(c_redo_complete_fragments.isEmpty());
StartRecConf * conf = (StartRecConf*)signal->getDataPtrSend(); StartRecConf * conf = (StartRecConf*)signal->getDataPtrSend();
conf->startingNodeId = getOwnNodeId(); conf->startingNodeId = getOwnNodeId();
...@@ -11893,7 +11894,7 @@ void Dblqh::execGCP_SAVEREQ(Signal* signal) ...@@ -11893,7 +11894,7 @@ void Dblqh::execGCP_SAVEREQ(Signal* signal)
return; return;
} }
if (getNodeState().getNodeRestartInProgress() && cstartRecReq == ZFALSE) if (getNodeState().getNodeRestartInProgress() && cstartRecReq < 2)
{ {
GCPSaveRef * const saveRef = (GCPSaveRef*)&signal->theData[0]; GCPSaveRef * const saveRef = (GCPSaveRef*)&signal->theData[0];
saveRef->dihPtr = dihPtr; saveRef->dihPtr = dihPtr;
...@@ -13978,7 +13979,7 @@ void Dblqh::execRESTORE_LCP_CONF(Signal* signal) ...@@ -13978,7 +13979,7 @@ void Dblqh::execRESTORE_LCP_CONF(Signal* signal)
return; return;
} }
if (c_lcp_restoring_fragments.isEmpty() && cstartRecReq == ZTRUE) if (c_lcp_restoring_fragments.isEmpty() && cstartRecReq == 1)
{ {
jam(); jam();
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
...@@ -14019,7 +14020,7 @@ void Dblqh::execSTART_RECREQ(Signal* signal) ...@@ -14019,7 +14020,7 @@ void Dblqh::execSTART_RECREQ(Signal* signal)
ndbrequire(req->receivingNodeId == cownNodeid); ndbrequire(req->receivingNodeId == cownNodeid);
cnewestCompletedGci = cnewestGci; cnewestCompletedGci = cnewestGci;
cstartRecReq = ZTRUE; cstartRecReq = 1;
for (logPartPtr.i = 0; logPartPtr.i < 4; logPartPtr.i++) { for (logPartPtr.i = 0; logPartPtr.i < 4; logPartPtr.i++) {
ptrAss(logPartPtr, logPartRecord); ptrAss(logPartPtr, logPartRecord);
logPartPtr.p->logPartNewestCompletedGCI = cnewestCompletedGci; logPartPtr.p->logPartNewestCompletedGCI = cnewestCompletedGci;
...@@ -14033,6 +14034,7 @@ void Dblqh::execSTART_RECREQ(Signal* signal) ...@@ -14033,6 +14034,7 @@ void Dblqh::execSTART_RECREQ(Signal* signal)
*------------------------------------------------------------------------ */ *------------------------------------------------------------------------ */
if(cstartType == NodeState::ST_INITIAL_NODE_RESTART){ if(cstartType == NodeState::ST_INITIAL_NODE_RESTART){
jam(); jam();
cstartRecReq = 2;
StartRecConf * conf = (StartRecConf*)signal->getDataPtrSend(); StartRecConf * conf = (StartRecConf*)signal->getDataPtrSend();
conf->startingNodeId = getOwnNodeId(); conf->startingNodeId = getOwnNodeId();
sendSignal(cmasterDihBlockref, GSN_START_RECCONF, signal, sendSignal(cmasterDihBlockref, GSN_START_RECCONF, signal,
...@@ -15856,6 +15858,7 @@ void Dblqh::srFourthComp(Signal* signal) ...@@ -15856,6 +15858,7 @@ void Dblqh::srFourthComp(Signal* signal)
return; return;
} }
} }
cstartRecReq = 2;
StartRecConf * conf = (StartRecConf*)signal->getDataPtrSend(); StartRecConf * conf = (StartRecConf*)signal->getDataPtrSend();
conf->startingNodeId = getOwnNodeId(); conf->startingNodeId = getOwnNodeId();
sendSignal(cmasterDihBlockref, GSN_START_RECCONF, signal, sendSignal(cmasterDihBlockref, GSN_START_RECCONF, signal,
...@@ -16724,7 +16727,7 @@ void Dblqh::initialiseRecordsLab(Signal* signal, Uint32 data, ...@@ -16724,7 +16727,7 @@ void Dblqh::initialiseRecordsLab(Signal* signal, Uint32 data,
cnoActiveCopy = 0; cnoActiveCopy = 0;
ccurrentGcprec = RNIL; ccurrentGcprec = RNIL;
caddNodeState = ZFALSE; caddNodeState = ZFALSE;
cstartRecReq = ZFALSE; cstartRecReq = 0;
cnewestGci = 0; cnewestGci = 0;
cnewestCompletedGci = 0; cnewestCompletedGci = 0;
crestartOldestGci = 0; crestartOldestGci = 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