fix(tsdb/cache): release lock when table's empty

This commit is contained in:
Minglei Jin 2022-10-14 15:28:19 +08:00
parent 3a0ea21342
commit 977fc4b15c
1 changed files with 2 additions and 0 deletions

View File

@ -1311,6 +1311,8 @@ int32_t tsdbCacheGetLastH(SLRUCache *pCache, tb_uid_t uid, STsdb *pTsdb, LRUHand
// if table's empty or error, return code of -1
// if (code < 0 || pRow == NULL) {
if (code < 0 || pLastArray == NULL) {
taosThreadMutexUnlock(&pTsdb->lruMutex);
*handle = NULL;
return 0;
}