ndb - bug#29354 - Incorrect handling of replica REDO during SR (5.0)

  Not very clever fix for DIH incorrect REDO handling
  - Dont report GCP_SAVE_CONF until first LCP has been complete during NR
parent f6c0acde
...@@ -11164,6 +11164,13 @@ void Dblqh::sendLCP_COMPLETE_REP(Signal* signal, Uint32 lcpId) ...@@ -11164,6 +11164,13 @@ void Dblqh::sendLCP_COMPLETE_REP(Signal* signal, Uint32 lcpId)
jam(); jam();
sendEMPTY_LCP_CONF(signal, true); sendEMPTY_LCP_CONF(signal, true);
} }
if (getNodeState().getNodeRestartInProgress())
{
jam();
ndbrequire(cstartRecReq == 2);
cstartRecReq = 3;
}
return; return;
}//Dblqh::sendCOMP_LCP_ROUND() }//Dblqh::sendCOMP_LCP_ROUND()
...@@ -11729,15 +11736,27 @@ void Dblqh::execGCP_SAVEREQ(Signal* signal) ...@@ -11729,15 +11736,27 @@ void Dblqh::execGCP_SAVEREQ(Signal* signal)
return; return;
} }
ccurrentGcprec = 0;
gcpPtr.i = ccurrentGcprec;
ptrCheckGuard(gcpPtr, cgcprecFileSize, gcpRecord);
cnewestCompletedGci = gci; cnewestCompletedGci = gci;
if (gci > cnewestGci) { if (gci > cnewestGci) {
jam(); jam();
cnewestGci = gci; cnewestGci = gci;
}//if }//if
if(getNodeState().getNodeRestartInProgress() && cstartRecReq < 3)
{
GCPSaveRef * const saveRef = (GCPSaveRef*)&signal->theData[0];
saveRef->dihPtr = dihPtr;
saveRef->nodeId = getOwnNodeId();
saveRef->gci = gci;
saveRef->errorCode = GCPSaveRef::NodeRestartInProgress;
sendSignal(dihBlockRef, GSN_GCP_SAVEREF, signal,
GCPSaveRef::SignalLength, JBB);
return;
}
ccurrentGcprec = 0;
gcpPtr.i = ccurrentGcprec;
ptrCheckGuard(gcpPtr, cgcprecFileSize, gcpRecord);
gcpPtr.p->gcpBlockref = dihBlockRef; gcpPtr.p->gcpBlockref = dihBlockRef;
gcpPtr.p->gcpUserptr = dihPtr; gcpPtr.p->gcpUserptr = dihPtr;
......
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