Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
6332c982
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1193
Star
22018
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
6332c982
编写于
1月 13, 2023
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(query): fix invalid read
上级
bb5fb42c
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
1 addition
and
53 deletion
+1
-53
source/dnode/vnode/src/meta/metaCache.c
source/dnode/vnode/src/meta/metaCache.c
+1
-53
未找到文件。
source/dnode/vnode/src/meta/metaCache.c
浏览文件 @
6332c982
...
@@ -158,9 +158,9 @@ void metaCacheClose(SMeta* pMeta) {
...
@@ -158,9 +158,9 @@ void metaCacheClose(SMeta* pMeta) {
entryCacheClose
(
pMeta
);
entryCacheClose
(
pMeta
);
statsCacheClose
(
pMeta
);
statsCacheClose
(
pMeta
);
taosHashCleanup
(
pMeta
->
pCache
->
sTagFilterResCache
.
pTableEntry
);
taosLRUCacheCleanup
(
pMeta
->
pCache
->
sTagFilterResCache
.
pUidResCache
);
taosLRUCacheCleanup
(
pMeta
->
pCache
->
sTagFilterResCache
.
pUidResCache
);
taosThreadMutexDestroy
(
&
pMeta
->
pCache
->
sTagFilterResCache
.
lock
);
taosThreadMutexDestroy
(
&
pMeta
->
pCache
->
sTagFilterResCache
.
lock
);
taosHashCleanup
(
pMeta
->
pCache
->
sTagFilterResCache
.
pTableEntry
);
taosMemoryFree
(
pMeta
->
pCache
);
taosMemoryFree
(
pMeta
->
pCache
);
pMeta
->
pCache
=
NULL
;
pMeta
->
pCache
=
NULL
;
...
@@ -620,58 +620,6 @@ int32_t metaUidFilterCachePut(SMeta* pMeta, uint64_t suid, const void* pKey, int
...
@@ -620,58 +620,6 @@ int32_t metaUidFilterCachePut(SMeta* pMeta, uint64_t suid, const void* pKey, int
}
else
{
// not equal, append it
}
else
{
// not equal, append it
tdListAppend
(
&
(
*
pEntry
)
->
list
,
pKey
);
tdListAppend
(
&
(
*
pEntry
)
->
list
,
pKey
);
}
}
/*} else { // more than one element
bool checkCacheEntry = false;
SArray* pInvalidRes = NULL;
uint64_t keyBuf[3];
// if the threshold value is reached, need to check the value.
// if (NEED_CHECK_CACHE_ITEM(size, (*pEntry)->qTimes)) {
// checkCacheEntry = true;
// keyBuf[0] = suid;
// pInvalidRes = taosArrayInit(64, POINTER_BYTES);
// }
SListIter iter = {0};
tdListInitIter(&(*pEntry)->list, &iter, TD_LIST_FORWARD);
SListNode* pNode = NULL;
while ((pNode = tdListNext(&iter)) != NULL) {
uint64_t* p = (uint64_t*)pNode->data;
// key already exists in cache, quit
if (p[1] == ((uint64_t*)pKey)[1] && p[0] == ((uint64_t*)pKey)[0]) {
// do remove invalid entry in hash
if (pInvalidRes != NULL) {
removeInvalidCacheItem(pInvalidRes, *pEntry, false);
}
taosThreadMutexUnlock(pLock);
return TSDB_CODE_SUCCESS;
}
// check whether it is existed in LRU cache, and remove it from linked list if not
// we record every invalid items and remove when the loop is over.
if (checkCacheEntry) {
keyBuf[1] = p[1];
keyBuf[2] = p[2];
LRUHandle* pRes = taosLRUCacheLookup(pCache, keyBuf, 24);
if (pRes == NULL) { // add the invalid item in the array list to be removed.
taosArrayPush(pInvalidRes, &pNode);
} else {
taosLRUCacheRelease(pCache, pRes, false);
}
}
}
// do remove invalid entry in hash
if (pInvalidRes != NULL) {
removeInvalidCacheItem(pInvalidRes, *pEntry, false);
}
tdListAppend(&(*pEntry)->list, pKey);
}*/
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录