Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
f487c4e6
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1192
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看板
未验证
提交
f487c4e6
编写于
1月 28, 2023
作者:
X
Xiaoyu Wang
提交者:
GitHub
1月 28, 2023
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #19524 from taosdata/fix/long_query
fix(query): switch buffer pool recycle on
上级
e2d7d749
59ecfb6d
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
5 addition
and
60 deletion
+5
-60
source/dnode/vnode/src/tsdb/tsdbMemTable.c
source/dnode/vnode/src/tsdb/tsdbMemTable.c
+1
-53
source/dnode/vnode/src/vnd/vnodeBufPool.c
source/dnode/vnode/src/vnd/vnodeBufPool.c
+1
-3
source/dnode/vnode/src/vnd/vnodeCommit.c
source/dnode/vnode/src/vnd/vnodeCommit.c
+2
-2
source/libs/parser/src/parInsertUtil.c
source/libs/parser/src/parInsertUtil.c
+1
-2
未找到文件。
source/dnode/vnode/src/tsdb/tsdbMemTable.c
浏览文件 @
f487c4e6
...
@@ -64,8 +64,6 @@ int32_t tsdbMemTableCreate(STsdb *pTsdb, SMemTable **ppMemTable) {
...
@@ -64,8 +64,6 @@ int32_t tsdbMemTableCreate(STsdb *pTsdb, SMemTable **ppMemTable) {
taosMemoryFree
(
pMemTable
);
taosMemoryFree
(
pMemTable
);
goto
_err
;
goto
_err
;
}
}
// pMemTable->qList.pNext = &pMemTable->qList;
// pMemTable->qList.ppNext = &pMemTable->qList.pNext;
vnodeBufPoolRef
(
pMemTable
->
pPool
);
vnodeBufPoolRef
(
pMemTable
->
pPool
);
*
ppMemTable
=
pMemTable
;
*
ppMemTable
=
pMemTable
;
...
@@ -112,30 +110,6 @@ int32_t tsdbInsertTableData(STsdb *pTsdb, int64_t version, SSubmitTbData *pSubmi
...
@@ -112,30 +110,6 @@ int32_t tsdbInsertTableData(STsdb *pTsdb, int64_t version, SSubmitTbData *pSubmi
tb_uid_t
suid
=
pSubmitTbData
->
suid
;
tb_uid_t
suid
=
pSubmitTbData
->
suid
;
tb_uid_t
uid
=
pSubmitTbData
->
uid
;
tb_uid_t
uid
=
pSubmitTbData
->
uid
;
#if 0
SMetaInfo info;
code = metaGetInfo(pTsdb->pVnode->pMeta, uid, &info, NULL);
if (code) {
code = TSDB_CODE_TDB_TABLE_NOT_EXIST;
goto _err;
}
if (info.suid != suid) {
code = TSDB_CODE_INVALID_MSG;
goto _err;
}
if (info.suid) {
metaGetInfo(pTsdb->pVnode->pMeta, info.suid, &info, NULL);
}
if (pSubmitTbData->sver != info.skmVer) {
tsdbError("vgId:%d, req sver:%d, skmVer:%d suid:%" PRId64 " uid:%" PRId64, TD_VID(pTsdb->pVnode),
pSubmitTbData->sver, info.skmVer, suid, uid);
code = TSDB_CODE_TDB_INVALID_TABLE_SCHEMA_VER;
goto _err;
}
if (pRsp) pRsp->sver = info.skmVer;
#endif
// create/get STbData to op
// create/get STbData to op
code
=
tsdbGetOrCreateTbData
(
pMemTable
,
suid
,
uid
,
&
pTbData
);
code
=
tsdbGetOrCreateTbData
(
pMemTable
,
suid
,
uid
,
&
pTbData
);
if
(
code
)
{
if
(
code
)
{
...
@@ -811,30 +785,4 @@ SArray *tsdbMemTableGetTbDataArray(SMemTable *pMemTable) {
...
@@ -811,30 +785,4 @@ SArray *tsdbMemTableGetTbDataArray(SMemTable *pMemTable) {
_exit:
_exit:
return
aTbDataP
;
return
aTbDataP
;
}
}
\ No newline at end of file
// int32_t tsdbRecycleMemTable(SMemTable *pMemTable) {
// int32_t code = 0;
// SQueryNode *pNode = pMemTable->qList.pNext;
// while (1) {
// ASSERT(pNode != &pMemTable->qList);
// SQueryNode *pNextNode = pNode->pNext;
// if (pNextNode == &pMemTable->qList) {
// code = (*pNode->reseek)(pNode->pQHandle);
// if (code) goto _exit;
// break;
// } else {
// code = (*pNode->reseek)(pNode->pQHandle);
// if (code) goto _exit;
// pNode = pMemTable->qList.pNext;
// ASSERT(pNode == pNextNode);
// }
// }
// // NOTE: Take care here, pMemTable is destroyed
// _exit:
// return code;
// }
source/dnode/vnode/src/vnd/vnodeBufPool.c
浏览文件 @
f487c4e6
...
@@ -252,8 +252,6 @@ void vnodeBufPoolUnRef(SVBufPool *pPool, bool proactive) {
...
@@ -252,8 +252,6 @@ void vnodeBufPoolUnRef(SVBufPool *pPool, bool proactive) {
if
(
pVnode
->
onRecycle
==
pPool
)
{
if
(
pVnode
->
onRecycle
==
pPool
)
{
pVnode
->
onRecycle
=
NULL
;
pVnode
->
onRecycle
=
NULL
;
}
else
{
}
else
{
ASSERT
(
proactive
);
if
(
pPool
->
recyclePrev
)
{
if
(
pPool
->
recyclePrev
)
{
pPool
->
recyclePrev
->
recycleNext
=
pPool
->
recycleNext
;
pPool
->
recyclePrev
->
recycleNext
=
pPool
->
recycleNext
;
}
else
{
}
else
{
...
@@ -329,4 +327,4 @@ int32_t vnodeBufPoolRecycle(SVBufPool *pPool) {
...
@@ -329,4 +327,4 @@ int32_t vnodeBufPoolRecycle(SVBufPool *pPool) {
_exit:
_exit:
taosThreadMutexUnlock
(
&
pPool
->
mutex
);
taosThreadMutexUnlock
(
&
pPool
->
mutex
);
return
code
;
return
code
;
}
}
\ No newline at end of file
source/dnode/vnode/src/vnd/vnodeCommit.c
浏览文件 @
f487c4e6
...
@@ -75,10 +75,10 @@ static int32_t vnodeGetBufPoolToUse(SVnode *pVnode) {
...
@@ -75,10 +75,10 @@ static int32_t vnodeGetBufPoolToUse(SVnode *pVnode) {
break
;
break
;
}
else
{
}
else
{
vDebug
(
"vgId:%d no free buffer pool on %d try, try to recycle..."
,
TD_VID
(
pVnode
),
nTry
);
vDebug
(
"vgId:%d no free buffer pool on %d try, try to recycle..."
,
TD_VID
(
pVnode
),
nTry
);
/*
code
=
vnodeTryRecycleBufPool
(
pVnode
);
code
=
vnodeTryRecycleBufPool
(
pVnode
);
TSDB_CHECK_CODE
(
code
,
lino
,
_exit
);
TSDB_CHECK_CODE
(
code
,
lino
,
_exit
);
*/
if
(
pVnode
->
freeList
==
NULL
)
{
if
(
pVnode
->
freeList
==
NULL
)
{
vDebug
(
"vgId:%d no free buffer pool on %d try, wait %d ms..."
,
TD_VID
(
pVnode
),
nTry
,
WAIT_TIME_MILI_SEC
);
vDebug
(
"vgId:%d no free buffer pool on %d try, wait %d ms..."
,
TD_VID
(
pVnode
),
nTry
,
WAIT_TIME_MILI_SEC
);
...
...
source/libs/parser/src/parInsertUtil.c
浏览文件 @
f487c4e6
...
@@ -671,7 +671,6 @@ int rawBlockBindData(SQuery* query, STableMeta* pTableMeta, void* data, SVCreate
...
@@ -671,7 +671,6 @@ int rawBlockBindData(SQuery* query, STableMeta* pTableMeta, void* data, SVCreate
goto
end
;
goto
end
;
}
}
colLength
[
c
]
=
htonl
(
colLength
[
c
]);
int8_t
*
offset
=
pStart
;
int8_t
*
offset
=
pStart
;
if
(
IS_VAR_DATA_TYPE
(
pColSchema
->
type
))
{
if
(
IS_VAR_DATA_TYPE
(
pColSchema
->
type
))
{
pStart
+=
numOfRows
*
sizeof
(
int32_t
);
pStart
+=
numOfRows
*
sizeof
(
int32_t
);
...
@@ -687,4 +686,4 @@ int rawBlockBindData(SQuery* query, STableMeta* pTableMeta, void* data, SVCreate
...
@@ -687,4 +686,4 @@ int rawBlockBindData(SQuery* query, STableMeta* pTableMeta, void* data, SVCreate
end:
end:
return
ret
;
return
ret
;
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录