tsdb/cache-read: release lru handle in case table's empty

This commit is contained in:
Minglei Jin 2022-12-08 11:06:16 +08:00
parent 058ea5871c
commit 04948080bc
1 changed files with 10 additions and 2 deletions

View File

@ -250,7 +250,11 @@ int32_t tsdbRetrieveCacheRows(void* pReader, SSDataBlock* pResBlock, const int32
return code; return code;
} }
if (h == NULL || taosArrayGetSize(pRow) <= 0) { if (h == NULL) {
continue;
}
if (taosArrayGetSize(pRow) <= 0) {
tsdbCacheRelease(lruCache, h);
continue; continue;
} }
@ -319,7 +323,11 @@ int32_t tsdbRetrieveCacheRows(void* pReader, SSDataBlock* pResBlock, const int32
return code; return code;
} }
if (h == NULL || taosArrayGetSize(pRow) <= 0) { if (h == NULL) {
continue;
}
if (taosArrayGetSize(pRow) <= 0) {
tsdbCacheRelease(lruCache, h);
continue; continue;
} }