@@ -10123,6 +10123,11 @@ void Dbdict::execGET_TABINFOREQ(Signal* signal)
1012310123 return;
1012410124 }
1012510125
10126+ /**
10127+ * First stage response / queueing handled here
10128+ * Actual processing is done in doGET_TABINFOREQ()
10129+ */
10130+
1012610131 GetTabInfoReq * const req = (GetTabInfoReq *)&signal->theData[0];
1012710132
1012810133 if (ERROR_INSERTED(6215) &&
@@ -10183,6 +10188,18 @@ void Dbdict::execGET_TABINFOREQ(Signal* signal)
1018310188 return;
1018410189 }
1018510190
10191+ /* Not busy, cannot be anything queued... */
10192+ ndbrequire(c_gettabinforeq_q.isEmpty());
10193+
10194+ doGET_TABINFOREQ(signal);
10195+ } // execGET_TABINFOREQ()
10196+
10197+ void
10198+ Dbdict::doGET_TABINFOREQ(Signal* signal)
10199+ {
10200+ jam();
10201+ GetTabInfoReq * const req = (GetTabInfoReq *)&signal->theData[0];
10202+
1018610203 SectionHandle handle(this, signal);
1018710204
1018810205 if(ERROR_INSERTED(6216))
@@ -10242,7 +10259,7 @@ void Dbdict::execGET_TABINFOREQ(Signal* signal)
1024210259
1024310260 // If istable/index, allow ADD_STARTED (not to ref)
1024410261
10245- D("execGET_TABINFOREQ " << V(transId) << " " << *objEntry);
10262+ D("doGET_TABINFOREQ " << V(transId) << " " << *objEntry);
1024610263
1024710264 if (transId != 0 && transId == objEntry->m_transId)
1024810265 {
@@ -10263,6 +10280,15 @@ void Dbdict::execGET_TABINFOREQ(Signal* signal)
1026310280 }
1026410281 }
1026510282
10283+ /**
10284+ * From this point we agree to process this request
10285+ * and are 'busy' w.r.t. GETTABINFOREQ.
10286+ * Further incoming GETTABINFOREQ signals will
10287+ * be queued or rejected.
10288+ * When we finish processing this one, we must
10289+ * start any queued req.
10290+ */
10291+
1026610292 c_retrieveRecord.busyState = true;
1026710293 c_retrieveRecord.blockRef = req->senderRef;
1026810294 c_retrieveRecord.m_senderData = req->senderData;
@@ -10339,7 +10365,7 @@ void Dbdict::execGET_TABINFOREQ(Signal* signal)
1033910365 signal->theData[2] = objEntry->m_tableType;
1034010366 signal->theData[3] = c_retrieveRecord.retrievePage;
1034110367 sendSignal(reference(), GSN_CONTINUEB, signal, len, JBB);
10342- }//execGET_TABINFOREQ ()
10368+ }//doGET_TABINFOREQ ()
1034310369
1034410370void Dbdict::sendGetTabResponse(Signal* signal)
1034510371{
@@ -29924,11 +29950,39 @@ Dbdict::startNextGetTabInfoReq(Signal* signal)
2992429950 */
2992529951 ndbrequire(c_gettabinforeq_q.deqReq(signal));
2992629952
29953+ signal->header.theLength = GetTabInfoReq::SignalLength;
29954+
2992729955 c_retrieveRecord.busyState = false;
2992829956
29929- /* Execute...using EXECUTE_DIRECT to get signal trace */
29930- EXECUTE_DIRECT(number(),
29931- GSN_GET_TABINFOREQ,
29932- signal,
29933- GetTabInfoReq::SignalLength);
29957+ /**
29958+ * Todo : Queue + jam signal id to indicate which req
29959+ * we are starting in trace file
29960+ */
29961+ doGET_TABINFOREQ(signal);
29962+
29963+ if (!c_retrieveRecord.busyState)
29964+ {
29965+ jam();
29966+ /* That GET_TABINFOREQ is done with no
29967+ * blocking work.
29968+ * Any more on the queue?
29969+ */
29970+ if (!c_gettabinforeq_q.isEmpty())
29971+ {
29972+ jam();
29973+ /* We will trigger starting the next
29974+ * entry.
29975+ */
29976+ /* TODO : Option to do immediate DIRECT
29977+ * exec of next req up to limit of n
29978+ */
29979+
29980+ /* Stop queue-jumpers */
29981+ c_retrieveRecord.busyState = true;
29982+
29983+ signal->theData[0] = ZNEXT_GET_TAB_REQ;
29984+ sendSignal(reference(), GSN_CONTINUEB, signal,
29985+ 1, JBB);
29986+ }
29987+ }
2993429988}
0 commit comments