Commit b8a519b9 authored by unknown's avatar unknown

ndb - bug#20774

  crash if system restart with more than 4096 fragments
  solution: continueb enable expand check loop


ndb/src/kernel/blocks/dblqh/Dblqh.hpp:
  continueb enable expand check loop
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
  continueb enable expand check loop
parent cf270a7d
...@@ -232,6 +232,7 @@ ...@@ -232,6 +232,7 @@
#define ZSCAN_MARKERS 18 #define ZSCAN_MARKERS 18
#define ZOPERATION_EVENT_REP 19 #define ZOPERATION_EVENT_REP 19
#define ZPREP_DROP_TABLE 20 #define ZPREP_DROP_TABLE 20
#define ZENABLE_EXPAND_CHECK 21
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
/* NODE STATE DURING SYSTEM RESTART, VARIABLES CNODES_SR_STATE */ /* NODE STATE DURING SYSTEM RESTART, VARIABLES CNODES_SR_STATE */
......
...@@ -434,6 +434,33 @@ void Dblqh::execCONTINUEB(Signal* signal) ...@@ -434,6 +434,33 @@ void Dblqh::execCONTINUEB(Signal* signal)
checkDropTab(signal); checkDropTab(signal);
return; return;
break; break;
case ZENABLE_EXPAND_CHECK:
{
jam();
fragptr.i = signal->theData[1];
if (fragptr.i != RNIL)
{
jam();
ptrCheckGuard(fragptr, cfragrecFileSize, fragrecord);
signal->theData[0] = fragptr.p->tabRef;
signal->theData[1] = fragptr.p->fragId;
sendSignal(DBACC_REF, GSN_EXPANDCHECK2, signal, 2, JBB);
signal->theData[0] = ZENABLE_EXPAND_CHECK;
signal->theData[1] = fragptr.p->nextFrag;
sendSignal(DBLQH_REF, GSN_CONTINUEB, signal, 2, JBB);
return;
}
else
{
jam();
StartRecConf * conf = (StartRecConf*)signal->getDataPtrSend();
conf->startingNodeId = getOwnNodeId();
sendSignal(cmasterDihBlockref, GSN_START_RECCONF, signal,
StartRecConf::SignalLength, JBB);
return;
}
}
default: default:
ndbrequire(false); ndbrequire(false);
break; break;
...@@ -15503,20 +15530,21 @@ void Dblqh::srFourthComp(Signal* signal) ...@@ -15503,20 +15530,21 @@ void Dblqh::srFourthComp(Signal* signal)
} else if ((cstartType == NodeState::ST_NODE_RESTART) || } else if ((cstartType == NodeState::ST_NODE_RESTART) ||
(cstartType == NodeState::ST_SYSTEM_RESTART)) { (cstartType == NodeState::ST_SYSTEM_RESTART)) {
jam(); jam();
StartRecConf * conf = (StartRecConf*)signal->getDataPtrSend();
conf->startingNodeId = getOwnNodeId();
sendSignal(cmasterDihBlockref, GSN_START_RECCONF, signal,
StartRecConf::SignalLength, JBB);
if(cstartType == NodeState::ST_SYSTEM_RESTART){ if(cstartType == NodeState::ST_SYSTEM_RESTART)
fragptr.i = c_redo_log_complete_frags; {
while(fragptr.i != RNIL){ jam();
ptrCheckGuard(fragptr, cfragrecFileSize, fragrecord); signal->theData[0] = ZENABLE_EXPAND_CHECK;
signal->theData[0] = fragptr.p->tabRef; signal->theData[1] = c_redo_log_complete_frags;
signal->theData[1] = fragptr.p->fragId; sendSignal(DBLQH_REF, GSN_CONTINUEB, signal, 2, JBB);
sendSignal(DBACC_REF, GSN_EXPANDCHECK2, signal, 2, JBB); }
fragptr.i = fragptr.p->nextFrag; else
} {
jam();
StartRecConf * conf = (StartRecConf*)signal->getDataPtrSend();
conf->startingNodeId = getOwnNodeId();
sendSignal(cmasterDihBlockref, GSN_START_RECCONF, signal,
StartRecConf::SignalLength, JBB);
} }
} else { } else {
ndbrequire(false); ndbrequire(false);
......
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