cache/reader: cleanup contiue nex row
This commit is contained in:
parent
7fca057a81
commit
0e51277521
|
@ -1020,10 +1020,10 @@ int32_t tsdbCacheGetBatch(STsdb *pTsdb, tb_uid_t uid, SArray *pLastArray, SCache
|
||||||
code = tsdbCacheLoadFromRocks(pTsdb, uid, pLastArray, remainCols, pr, ltype);
|
code = tsdbCacheLoadFromRocks(pTsdb, uid, pLastArray, remainCols, pr, ltype);
|
||||||
|
|
||||||
taosThreadMutexUnlock(&pTsdb->lruMutex);
|
taosThreadMutexUnlock(&pTsdb->lruMutex);
|
||||||
}
|
|
||||||
|
|
||||||
if (remainCols) {
|
if (remainCols) {
|
||||||
taosArrayDestroy(remainCols);
|
taosArrayDestroy(remainCols);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return code;
|
return code;
|
||||||
|
|
|
@ -285,9 +285,7 @@ int32_t tsdbRetrieveCacheRows(void* pReader, SSDataBlock* pResBlock, const int32
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int32_t j = 0; j < pr->numOfCols; ++j) {
|
for (int32_t j = 0; j < pr->numOfCols; ++j) {
|
||||||
pRes[j] =
|
pRes[j] = taosMemoryCalloc(1, sizeof(SFirstLastRes) + pr->pSchema->columns[slotIds[j]].bytes + VARSTR_HEADER_SIZE);
|
||||||
taosMemoryCalloc(1, sizeof(SFirstLastRes) + pr->pSchema->columns[/*-1 == slotIds[j] ? 0 : */ slotIds[j]].bytes +
|
|
||||||
VARSTR_HEADER_SIZE);
|
|
||||||
SFirstLastRes* p = (SFirstLastRes*)varDataVal(pRes[j]);
|
SFirstLastRes* p = (SFirstLastRes*)varDataVal(pRes[j]);
|
||||||
p->ts = INT64_MIN;
|
p->ts = INT64_MIN;
|
||||||
}
|
}
|
||||||
|
@ -326,12 +324,7 @@ int32_t tsdbRetrieveCacheRows(void* pReader, SSDataBlock* pResBlock, const int32
|
||||||
tb_uid_t uid = pTableList[i].uid;
|
tb_uid_t uid = pTableList[i].uid;
|
||||||
|
|
||||||
tsdbCacheGetBatch(pr->pTsdb, uid, pRow, pr, ltype);
|
tsdbCacheGetBatch(pr->pTsdb, uid, pRow, pr, ltype);
|
||||||
if (TARRAY_SIZE(pRow) <= 0) {
|
if (TARRAY_SIZE(pRow) <= 0 || COL_VAL_IS_NONE(&((SLastCol*)TARRAY_DATA(pRow))[0].colVal)) {
|
||||||
taosArrayClearEx(pRow, freeItem);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
SLastCol* pColVal = taosArrayGet(pRow, 0);
|
|
||||||
if (COL_VAL_IS_NONE(&pColVal->colVal)) {
|
|
||||||
taosArrayClearEx(pRow, freeItem);
|
taosArrayClearEx(pRow, freeItem);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -404,12 +397,7 @@ int32_t tsdbRetrieveCacheRows(void* pReader, SSDataBlock* pResBlock, const int32
|
||||||
tb_uid_t uid = pTableList[i].uid;
|
tb_uid_t uid = pTableList[i].uid;
|
||||||
|
|
||||||
tsdbCacheGetBatch(pr->pTsdb, uid, pRow, pr, ltype);
|
tsdbCacheGetBatch(pr->pTsdb, uid, pRow, pr, ltype);
|
||||||
if (TARRAY_SIZE(pRow) <= 0) {
|
if (TARRAY_SIZE(pRow) <= 0 || COL_VAL_IS_NONE(&((SLastCol*)TARRAY_DATA(pRow))[0].colVal)) {
|
||||||
taosArrayClearEx(pRow, freeItem);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
SLastCol* pColVal = (SLastCol*)taosArrayGet(pRow, 0);
|
|
||||||
if (COL_VAL_IS_NONE(&pColVal->colVal)) {
|
|
||||||
taosArrayClearEx(pRow, freeItem);
|
taosArrayClearEx(pRow, freeItem);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue