Commit 5fac485a authored by unknown's avatar unknown

wl2025 - bug fixes

1) Release _all_ attr bufs
2) Handle out of attr bufs


ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
  Release _all_ attr bufs
  Handle out of attr bufs
parent 5c5cf8c4
...@@ -7283,6 +7283,7 @@ Dblqh::seize_acc_ptr_list(ScanRecord* scanP, Uint32 batch_size) ...@@ -7283,6 +7283,7 @@ Dblqh::seize_acc_ptr_list(ScanRecord* scanP, Uint32 batch_size)
{ {
Uint32 i; Uint32 i;
Uint32 attr_buf_recs= (batch_size + 30) / 32; Uint32 attr_buf_recs= (batch_size + 30) / 32;
if (batch_size > 1) { if (batch_size > 1) {
if (c_no_attrinbuf_recs < attr_buf_recs) { if (c_no_attrinbuf_recs < attr_buf_recs) {
jam(); jam();
...@@ -7302,7 +7303,8 @@ Dblqh::release_acc_ptr_list(ScanRecord* scanP) ...@@ -7302,7 +7303,8 @@ Dblqh::release_acc_ptr_list(ScanRecord* scanP)
{ {
Uint32 i, attr_buf_recs; Uint32 i, attr_buf_recs;
attr_buf_recs= scanP->scan_acc_attr_recs; attr_buf_recs= scanP->scan_acc_attr_recs;
for (i= 1; i < attr_buf_recs; i++) {
for (i= 1; i <= attr_buf_recs; i++) {
release_attrinbuf(scanP->scan_acc_op_ptr[i]); release_attrinbuf(scanP->scan_acc_op_ptr[i]);
} }
scanP->scan_acc_attr_recs= 0; scanP->scan_acc_attr_recs= 0;
...@@ -7570,9 +7572,9 @@ void Dblqh::continueAfterReceivingAllAiLab(Signal* signal) ...@@ -7570,9 +7572,9 @@ void Dblqh::continueAfterReceivingAllAiLab(Signal* signal)
void Dblqh::scanAttrinfoLab(Signal* signal, Uint32* dataPtr, Uint32 length) void Dblqh::scanAttrinfoLab(Signal* signal, Uint32* dataPtr, Uint32 length)
{ {
scanptr.i = tcConnectptr.p->tcScanRec;
c_scanRecordPool.getPtr(scanptr);
if (saveTupattrbuf(signal, dataPtr, length) == ZOK) { if (saveTupattrbuf(signal, dataPtr, length) == ZOK) {
scanptr.i = tcConnectptr.p->tcScanRec;
c_scanRecordPool.getPtr(scanptr);
if (tcConnectptr.p->currTupAiLen < scanptr.p->scanAiLength) { if (tcConnectptr.p->currTupAiLen < scanptr.p->scanAiLength) {
jam(); jam();
} else { } else {
...@@ -8394,7 +8396,6 @@ void Dblqh::tupScanCloseConfLab(Signal* signal) ...@@ -8394,7 +8396,6 @@ void Dblqh::tupScanCloseConfLab(Signal* signal)
scanptr.p->m_curr_batch_size_bytes= 0; scanptr.p->m_curr_batch_size_bytes= 0;
sendScanFragConf(signal, ZSCAN_FRAG_CLOSED); sendScanFragConf(signal, ZSCAN_FRAG_CLOSED);
}//if }//if
release_acc_ptr_list(scanptr.p);
finishScanrec(signal); finishScanrec(signal);
releaseScanrec(signal); releaseScanrec(signal);
tcConnectptr.p->tcScanRec = RNIL; tcConnectptr.p->tcScanRec = RNIL;
...@@ -8554,10 +8555,12 @@ void Dblqh::initScanTc(Signal* signal, ...@@ -8554,10 +8555,12 @@ void Dblqh::initScanTc(Signal* signal,
* ========================================================================= */ * ========================================================================= */
void Dblqh::finishScanrec(Signal* signal) void Dblqh::finishScanrec(Signal* signal)
{ {
release_acc_ptr_list(scanptr.p);
FragrecordPtr tFragPtr; FragrecordPtr tFragPtr;
tFragPtr.i = scanptr.p->fragPtrI; tFragPtr.i = scanptr.p->fragPtrI;
ptrCheckGuard(tFragPtr, cfragrecFileSize, fragrecord); ptrCheckGuard(tFragPtr, cfragrecFileSize, fragrecord);
LocalDLFifoList<ScanRecord> queue(c_scanRecordPool, LocalDLFifoList<ScanRecord> queue(c_scanRecordPool,
tFragPtr.p->m_queuedScans); tFragPtr.p->m_queuedScans);
......
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