cache/reader: clean uid in all loop
This commit is contained in:
parent
ed76525c4f
commit
95cc540d9b
|
@ -316,14 +316,13 @@ int32_t tsdbRetrieveCacheRows(void* pReader, SSDataBlock* pResBlock, const int32
|
||||||
goto _end;
|
goto _end;
|
||||||
}
|
}
|
||||||
|
|
||||||
int8_t ltype = (pr->type & CACHESCAN_RETRIEVE_LAST) >> 3;
|
int8_t ltype = (pr->type & CACHESCAN_RETRIEVE_LAST) >> 3;
|
||||||
|
STableKeyInfo* pTableList = pr->pTableList;
|
||||||
|
|
||||||
// retrieve the only one last row of all tables in the uid list.
|
// retrieve the only one last row of all tables in the uid list.
|
||||||
if (HASTYPE(pr->type, CACHESCAN_RETRIEVE_TYPE_SINGLE)) {
|
if (HASTYPE(pr->type, CACHESCAN_RETRIEVE_TYPE_SINGLE)) {
|
||||||
int64_t st = taosGetTimestampUs();
|
int64_t st = taosGetTimestampUs();
|
||||||
int64_t totalLastTs = INT64_MAX;
|
int64_t totalLastTs = INT64_MAX;
|
||||||
STableKeyInfo* pTableList = pr->pTableList;
|
|
||||||
|
|
||||||
for (int32_t i = 0; i < pr->numOfTables; ++i) {
|
for (int32_t i = 0; i < pr->numOfTables; ++i) {
|
||||||
tb_uid_t uid = pTableList[i].uid;
|
tb_uid_t uid = pTableList[i].uid;
|
||||||
|
|
||||||
|
@ -401,24 +400,21 @@ int32_t tsdbRetrieveCacheRows(void* pReader, SSDataBlock* pResBlock, const int32
|
||||||
}
|
}
|
||||||
} else if (HASTYPE(pr->type, CACHESCAN_RETRIEVE_TYPE_ALL)) {
|
} else if (HASTYPE(pr->type, CACHESCAN_RETRIEVE_TYPE_ALL)) {
|
||||||
for (int32_t i = pr->tableIndex; i < pr->numOfTables; ++i) {
|
for (int32_t i = pr->tableIndex; i < pr->numOfTables; ++i) {
|
||||||
tb_uid_t uid = pr->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) {
|
||||||
taosArrayClearEx(pRow, freeItem);
|
taosArrayClearEx(pRow, freeItem);
|
||||||
// taosArrayClear(pRow);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
SLastCol* pColVal = (SLastCol*)taosArrayGet(pRow, 0);
|
SLastCol* pColVal = (SLastCol*)taosArrayGet(pRow, 0);
|
||||||
if (COL_VAL_IS_NONE(&pColVal->colVal)) {
|
if (COL_VAL_IS_NONE(&pColVal->colVal)) {
|
||||||
taosArrayClearEx(pRow, freeItem);
|
taosArrayClearEx(pRow, freeItem);
|
||||||
// taosArrayClear(pRow);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
saveOneRow(pRow, pResBlock, pr, slotIds, dstSlotIds, pRes, pr->idstr);
|
saveOneRow(pRow, pResBlock, pr, slotIds, dstSlotIds, pRes, pr->idstr);
|
||||||
taosArrayClearEx(pRow, freeItem);
|
taosArrayClearEx(pRow, freeItem);
|
||||||
// taosArrayClear(pRow);
|
|
||||||
|
|
||||||
taosArrayPush(pTableUidList, &uid);
|
taosArrayPush(pTableUidList, &uid);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue