16 #include "DbtuxProxy.hpp"
18 #include "../dblqh/DblqhCommon.hpp"
24 addRecSignal(GSN_ALTER_INDX_IMPL_REQ, &DbtuxProxy::execALTER_INDX_IMPL_REQ);
25 addRecSignal(GSN_ALTER_INDX_IMPL_CONF, &DbtuxProxy::execALTER_INDX_IMPL_CONF);
26 addRecSignal(GSN_ALTER_INDX_IMPL_REF, &DbtuxProxy::execALTER_INDX_IMPL_REF);
29 addRecSignal(GSN_INDEX_STAT_IMPL_REQ, &DbtuxProxy::execINDEX_STAT_IMPL_REQ);
30 addRecSignal(GSN_INDEX_STAT_IMPL_CONF, &DbtuxProxy::execINDEX_STAT_IMPL_CONF);
31 addRecSignal(GSN_INDEX_STAT_IMPL_REF, &DbtuxProxy::execINDEX_STAT_IMPL_REF);
34 addRecSignal(GSN_INDEX_STAT_REP, &DbtuxProxy::execINDEX_STAT_REP);
37 DbtuxProxy::~DbtuxProxy()
42 DbtuxProxy::newWorker(Uint32 instanceNo)
44 return new Dbtux(m_ctx, instanceNo);
50 DbtuxProxy::execALTER_INDX_IMPL_REQ(
Signal* signal)
53 Ss_ALTER_INDX_IMPL_REQ& ss = ssSeize<Ss_ALTER_INDX_IMPL_REQ>();
55 ndbrequire(signal->getLength() == AlterIndxImplReq::SignalLength);
60 DbtuxProxy::sendALTER_INDX_IMPL_REQ(
Signal* signal, Uint32 ssId,
63 Ss_ALTER_INDX_IMPL_REQ& ss = ssFind<Ss_ALTER_INDX_IMPL_REQ>(ssId);
67 req->senderRef = reference();
68 req->senderData = ssId;
70 signal, AlterIndxImplReq::SignalLength, JBB, handle);
74 DbtuxProxy::execALTER_INDX_IMPL_CONF(
Signal* signal)
77 Uint32 ssId = conf->senderData;
78 Ss_ALTER_INDX_IMPL_REQ& ss = ssFind<Ss_ALTER_INDX_IMPL_REQ>(ssId);
83 DbtuxProxy::execALTER_INDX_IMPL_REF(
Signal* signal)
86 Uint32 ssId = ref->senderData;
87 Ss_ALTER_INDX_IMPL_REQ& ss = ssFind<Ss_ALTER_INDX_IMPL_REQ>(ssId);
88 recvREF(signal, ss, ref->errorCode);
92 DbtuxProxy::sendALTER_INDX_IMPL_CONF(
Signal* signal, Uint32 ssId)
94 Ss_ALTER_INDX_IMPL_REQ& ss = ssFind<Ss_ALTER_INDX_IMPL_REQ>(ssId);
95 BlockReference dictRef = ss.m_req.senderRef;
100 if (ss.m_error == 0) {
103 conf->senderRef = reference();
104 conf->senderData = ss.m_req.senderData;
105 sendSignal(dictRef, GSN_ALTER_INDX_IMPL_CONF,
106 signal, AlterIndxImplConf::SignalLength, JBB);
109 ref->senderRef = reference();
110 ref->senderData = ss.m_req.senderData;
111 ref->errorCode = ss.m_error;
112 sendSignal(dictRef, GSN_ALTER_INDX_IMPL_REF,
113 signal, AlterIndxImplRef::SignalLength, JBB);
116 ssRelease<Ss_ALTER_INDX_IMPL_REQ>(ssId);
122 DbtuxProxy::execINDEX_STAT_IMPL_REQ(
Signal* signal)
127 Ss_INDEX_STAT_IMPL_REQ& ss = ssSeize<Ss_INDEX_STAT_IMPL_REQ>();
129 ndbrequire(signal->getLength() == IndexStatImplReq::SignalLength);
134 DbtuxProxy::sendINDEX_STAT_IMPL_REQ(
Signal* signal, Uint32 ssId,
137 Ss_INDEX_STAT_IMPL_REQ& ss = ssFind<Ss_INDEX_STAT_IMPL_REQ>(ssId);
141 req->senderRef = reference();
142 req->senderData = ssId;
144 const Uint32 instance = workerInstance(ss.m_worker);
148 switch (req->requestType) {
149 case IndexStatReq::RT_START_MON:
155 if (req->fragId != ZNIL
156 && !lpinfo.partNoOwner(req->indexId, req->fragId)) {
161 case IndexStatReq::RT_STOP_MON:
166 ndbrequire(req->fragId == ZNIL);
168 case IndexStatReq::RT_SCAN_FRAG:
169 ndbrequire(req->fragId != ZNIL);
170 if (!lpinfo.partNoOwner(req->indexId, req->fragId)) {
176 case IndexStatReq::RT_CLEAN_NEW:
177 case IndexStatReq::RT_CLEAN_OLD:
178 case IndexStatReq::RT_CLEAN_ALL:
179 ndbrequire(req->fragId == ZNIL);
181 case IndexStatReq::RT_DROP_HEAD:
186 ndbrequire(req->fragId != ZNIL);
187 if (!lpinfo.partNoOwner(req->indexId, req->fragId)) {
198 sendSignal(workerRef(ss.m_worker), GSN_INDEX_STAT_IMPL_REQ,
199 signal, IndexStatImplReq::SignalLength, JBB);
203 DbtuxProxy::execINDEX_STAT_IMPL_CONF(
Signal* signal)
208 Uint32 ssId = conf->senderData;
209 Ss_INDEX_STAT_IMPL_REQ& ss = ssFind<Ss_INDEX_STAT_IMPL_REQ>(ssId);
210 recvCONF(signal, ss);
214 DbtuxProxy::execINDEX_STAT_IMPL_REF(
Signal* signal)
218 Uint32 ssId = ref->senderData;
219 Ss_INDEX_STAT_IMPL_REQ& ss = ssFind<Ss_INDEX_STAT_IMPL_REQ>(ssId);
220 recvREF(signal, ss, ref->errorCode);
224 DbtuxProxy::sendINDEX_STAT_IMPL_CONF(
Signal* signal, Uint32 ssId)
226 Ss_INDEX_STAT_IMPL_REQ& ss = ssFind<Ss_INDEX_STAT_IMPL_REQ>(ssId);
227 BlockReference dictRef = ss.m_req.senderRef;
232 if (ss.m_error == 0) {
235 conf->senderRef = reference();
236 conf->senderData = ss.m_req.senderData;
237 sendSignal(dictRef, GSN_INDEX_STAT_IMPL_CONF,
238 signal, IndexStatImplConf::SignalLength, JBB);
241 ref->senderRef = reference();
242 ref->senderData = ss.m_req.senderData;
243 ref->errorCode = ss.m_error;
244 sendSignal(dictRef, GSN_INDEX_STAT_IMPL_REF,
245 signal, IndexStatImplRef::SignalLength, JBB);
248 ssRelease<Ss_INDEX_STAT_IMPL_REQ>(ssId);
254 DbtuxProxy::execINDEX_STAT_REP(
Signal* signal)
259 Ss_INDEX_STAT_REP& ss = ssSeize<Ss_INDEX_STAT_REP>();
261 ndbrequire(signal->getLength() == IndexStatRep::SignalLength);
263 ssRelease<Ss_INDEX_STAT_REP>(ss);
267 DbtuxProxy::sendINDEX_STAT_REP(
Signal* signal, Uint32 ssId,
270 Ss_INDEX_STAT_REP& ss = ssFind<Ss_INDEX_STAT_REP>(ssId);
274 rep->senderData = reference();
275 rep->senderData = ssId;
277 const Uint32 instance = workerInstance(ss.m_worker);
280 ndbrequire(rep->fragId != ZNIL);
281 if (!lpinfo.partNoOwner(rep->indexId, rep->fragId)) {
287 sendSignal(workerRef(ss.m_worker), GSN_INDEX_STAT_REP,
288 signal, IndexStatRep::SignalLength, JBB);