提交 2918faf1 编写于 作者: S shenglian zhou

fix: release the local meta cache of each sql

上级 78875b91
......@@ -3393,7 +3393,7 @@ int tscRenewTableMeta(SSqlObj *pSql) {
SSqlCmd* pCmd2 = &pSql->rootObj->cmd;
SHashObj *pmap = pCmd2->pTableMetaMap;
if (pmap == atomic_val_compare_exchange_ptr(&pCmd2->pTableMetaMap, pmap, NULL)) {
tscCleanupTableMetaMap(pCmd2->pTableMetaMap);
tscCleanupTableMetaMap(pmap);
}
pCmd2->pTableMetaMap = taosHashInit(4, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY), false, HASH_ENTRY_LOCK);
......
......@@ -1653,7 +1653,7 @@ void tscResetSqlCmd(SSqlCmd* pCmd, bool clearCachedMeta, uint64_t id) {
tscFreeQueryInfo(pCmd, clearCachedMeta, id);
SHashObj *pmap = pCmd->pTableMetaMap;
if (pmap == atomic_val_compare_exchange_ptr(&pCmd->pTableMetaMap, pmap, NULL)) {
tscCleanupTableMetaMap(pCmd->pTableMetaMap);
tscCleanupTableMetaMap(pmap);
}
taosReleaseRef(tscObjRef, id);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册