Merge pull request #22805 from taosdata/fix/TD-26160
fix: remove db dead lock issue
This commit is contained in:
commit
cd53ab870a
|
@ -760,12 +760,14 @@ int32_t ctgGetCachedStbNameFromSuid(SCatalog* pCtg, char* dbFName, uint64_t suid
|
||||||
char *stb = taosHashAcquire(dbCache->stbCache, &suid, sizeof(suid));
|
char *stb = taosHashAcquire(dbCache->stbCache, &suid, sizeof(suid));
|
||||||
if (NULL == stb) {
|
if (NULL == stb) {
|
||||||
ctgDebug("stb 0x%" PRIx64 " not in cache, dbFName:%s", suid, dbFName);
|
ctgDebug("stb 0x%" PRIx64 " not in cache, dbFName:%s", suid, dbFName);
|
||||||
|
ctgReleaseDBCache(pCtg, dbCache);
|
||||||
return TSDB_CODE_SUCCESS;
|
return TSDB_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
*stbName = taosStrdup(stb);
|
*stbName = taosStrdup(stb);
|
||||||
|
|
||||||
taosHashRelease(dbCache->stbCache, stb);
|
taosHashRelease(dbCache->stbCache, stb);
|
||||||
|
ctgReleaseDBCache(pCtg, dbCache);
|
||||||
|
|
||||||
return TSDB_CODE_SUCCESS;
|
return TSDB_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue