@@ -10060,6 +10060,11 @@ void Dbdict::execGET_TABINFOREQ(Signal* signal)
1006010060 return;
1006110061 }
1006210062
10063+ /**
10064+ * First stage response / queueing handled here
10065+ * Actual processing is done in doGET_TABINFOREQ()
10066+ */
10067+
1006310068 GetTabInfoReq * const req = (GetTabInfoReq *)&signal->theData[0];
1006410069
1006510070 if (ERROR_INSERTED(6215) &&
@@ -10106,6 +10111,18 @@ void Dbdict::execGET_TABINFOREQ(Signal* signal)
1010610111 return;
1010710112 }
1010810113
10114+ /* Not busy, cannot be anything queued... */
10115+ ndbrequire(c_gettabinforeq_q.isEmpty());
10116+
10117+ doGET_TABINFOREQ(signal);
10118+ } // execGET_TABINFOREQ()
10119+
10120+ void
10121+ Dbdict::doGET_TABINFOREQ(Signal* signal)
10122+ {
10123+ jam();
10124+ GetTabInfoReq * const req = (GetTabInfoReq *)&signal->theData[0];
10125+
1010910126 SectionHandle handle(this, signal);
1011010127
1011110128 const bool useLongSig = (req->requestType & GetTabInfoReq::LongSignalConf);
@@ -10156,7 +10173,7 @@ void Dbdict::execGET_TABINFOREQ(Signal* signal)
1015610173
1015710174 // If istable/index, allow ADD_STARTED (not to ref)
1015810175
10159- D("execGET_TABINFOREQ " << V(transId) << " " << *objEntry);
10176+ D("doGET_TABINFOREQ " << V(transId) << " " << *objEntry);
1016010177
1016110178 if (transId != 0 && transId == objEntry->m_transId)
1016210179 {
@@ -10177,6 +10194,15 @@ void Dbdict::execGET_TABINFOREQ(Signal* signal)
1017710194 }
1017810195 }
1017910196
10197+ /**
10198+ * From this point we agree to process this request
10199+ * and are 'busy' w.r.t. GETTABINFOREQ.
10200+ * Further incoming GETTABINFOREQ signals will
10201+ * be queued or rejected.
10202+ * When we finish processing this one, we must
10203+ * start any queued req.
10204+ */
10205+
1018010206 c_retrieveRecord.busyState = true;
1018110207 c_retrieveRecord.blockRef = req->senderRef;
1018210208 c_retrieveRecord.m_senderData = req->senderData;
@@ -10253,7 +10279,7 @@ void Dbdict::execGET_TABINFOREQ(Signal* signal)
1025310279 signal->theData[2] = objEntry->m_tableType;
1025410280 signal->theData[3] = c_retrieveRecord.retrievePage;
1025510281 sendSignal(reference(), GSN_CONTINUEB, signal, len, JBB);
10256- }//execGET_TABINFOREQ ()
10282+ }//doGET_TABINFOREQ ()
1025710283
1025810284void Dbdict::sendGetTabResponse(Signal* signal)
1025910285{
@@ -29838,11 +29864,39 @@ Dbdict::startNextGetTabInfoReq(Signal* signal)
2983829864 */
2983929865 ndbrequire(c_gettabinforeq_q.deqReq(signal));
2984029866
29867+ signal->header.theLength = GetTabInfoReq::SignalLength;
29868+
2984129869 c_retrieveRecord.busyState = false;
2984229870
29843- /* Execute...using EXECUTE_DIRECT to get signal trace */
29844- EXECUTE_DIRECT(number(),
29845- GSN_GET_TABINFOREQ,
29846- signal,
29847- GetTabInfoReq::SignalLength);
29871+ /**
29872+ * Todo : Queue + jam signal id to indicate which req
29873+ * we are starting in trace file
29874+ */
29875+ doGET_TABINFOREQ(signal);
29876+
29877+ if (!c_retrieveRecord.busyState)
29878+ {
29879+ jam();
29880+ /* That GET_TABINFOREQ is done with no
29881+ * blocking work.
29882+ * Any more on the queue?
29883+ */
29884+ if (!c_gettabinforeq_q.isEmpty())
29885+ {
29886+ jam();
29887+ /* We will trigger starting the next
29888+ * entry.
29889+ */
29890+ /* TODO : Option to do immediate DIRECT
29891+ * exec of next req up to limit of n
29892+ */
29893+
29894+ /* Stop queue-jumpers */
29895+ c_retrieveRecord.busyState = true;
29896+
29897+ signal->theData[0] = ZNEXT_GET_TAB_REQ;
29898+ sendSignal(reference(), GSN_CONTINUEB, signal,
29899+ 1, JBB);
29900+ }
29901+ }
2984829902}
0 commit comments