Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
b12e12f8
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
b12e12f8
编写于
11月 12, 2019
作者:
H
hjxilinx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add some logs for release resource at vnode side
上级
8833fc69
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
17 addition
and
10 deletion
+17
-10
src/inc/tsdb.h
src/inc/tsdb.h
+9
-9
src/system/detail/src/vnodeShell.c
src/system/detail/src/vnodeShell.c
+8
-1
未找到文件。
src/inc/tsdb.h
浏览文件 @
b12e12f8
...
@@ -221,20 +221,20 @@ enum _syncstatus {
...
@@ -221,20 +221,20 @@ enum _syncstatus {
#define TSDB_MAX_RPC_THREADS 5
#define TSDB_MAX_RPC_THREADS 5
#define TSDB_QUERY_TYPE_QUERY 0 // normal query
#define TSDB_QUERY_TYPE_QUERY 0 // normal query
#define TSDB_QUERY_TYPE_FREE_RESOURCE 0x
1
// free qhandle at vnode
#define TSDB_QUERY_TYPE_FREE_RESOURCE 0x
01U
// free qhandle at vnode
/*
/*
* 1. ordinary sub query for select * from super_table
* 1. ordinary sub query for select * from super_table
* 2. all sqlobj generated by createSubqueryObj with this flag
* 2. all sqlobj generated by createSubqueryObj with this flag
*/
*/
#define TSDB_QUERY_TYPE_SUBQUERY 0x
2
#define TSDB_QUERY_TYPE_SUBQUERY 0x
02U
#define TSDB_QUERY_TYPE_STABLE_SUBQUERY 0x
4
// two-stage subquery for super table
#define TSDB_QUERY_TYPE_STABLE_SUBQUERY 0x
04U
// two-stage subquery for super table
#define TSDB_QUERY_TYPE_TABLE_QUERY 0x
8
// query ordinary table; below only apply to client side
#define TSDB_QUERY_TYPE_TABLE_QUERY 0x
08U
// query ordinary table; below only apply to client side
#define TSDB_QUERY_TYPE_STABLE_QUERY 0x10 // query on super table
#define TSDB_QUERY_TYPE_STABLE_QUERY 0x10
U
// query on super table
#define TSDB_QUERY_TYPE_JOIN_QUERY 0x20 // join query
#define TSDB_QUERY_TYPE_JOIN_QUERY 0x20
U
// join query
#define TSDB_QUERY_TYPE_PROJECTION_QUERY 0x40 // select *,columns... query
#define TSDB_QUERY_TYPE_PROJECTION_QUERY 0x40
U
// select *,columns... query
#define TSDB_QUERY_TYPE_JOIN_SEC_STAGE 0x80 // join sub query at the second stage
#define TSDB_QUERY_TYPE_JOIN_SEC_STAGE 0x80
U
// join sub query at the second stage
#ifdef __cplusplus
#ifdef __cplusplus
}
}
...
...
src/system/detail/src/vnodeShell.c
浏览文件 @
b12e12f8
...
@@ -385,14 +385,21 @@ void vnodeExecuteRetrieveReq(SSchedMsg *pSched) {
...
@@ -385,14 +385,21 @@ void vnodeExecuteRetrieveReq(SSchedMsg *pSched) {
pRetrieve
=
(
SRetrieveMeterMsg
*
)
pMsg
;
pRetrieve
=
(
SRetrieveMeterMsg
*
)
pMsg
;
pRetrieve
->
free
=
htons
(
pRetrieve
->
free
);
pRetrieve
->
free
=
htons
(
pRetrieve
->
free
);
if
((
pRetrieve
->
free
&
TSDB_QUERY_TYPE_FREE_RESOURCE
)
!=
TSDB_QUERY_TYPE_FREE_RESOURCE
)
{
dTrace
(
"retrieve msg, handle:%p, free:%d"
,
pRetrieve
->
qhandle
,
pRetrieve
->
free
);
}
else
{
dTrace
(
"retrieve msg to free resource from client, handle:%p, free:%d"
,
pRetrieve
->
qhandle
,
pRetrieve
->
free
);
}
/*
/*
* in case of server restart, apps may hold qhandle created by server before restart,
* in case of server restart, apps may hold qhandle created by server before restart,
* which is actually invalid, therefore, signature check is required.
* which is actually invalid, therefore, signature check is required.
*/
*/
if
(
pRetrieve
->
qhandle
==
(
uint64_t
)
pObj
->
qhandle
)
{
if
(
pRetrieve
->
qhandle
==
(
uint64_t
)
pObj
->
qhandle
)
{
// if free flag is set, client wants to clean the resources
// if free flag is set, client wants to clean the resources
if
((
pRetrieve
->
free
&
TSDB_QUERY_TYPE_FREE_RESOURCE
)
!=
TSDB_QUERY_TYPE_FREE_RESOURCE
)
if
((
pRetrieve
->
free
&
TSDB_QUERY_TYPE_FREE_RESOURCE
)
!=
TSDB_QUERY_TYPE_FREE_RESOURCE
)
{
code
=
vnodeRetrieveQueryInfo
((
void
*
)(
pRetrieve
->
qhandle
),
&
numOfRows
,
&
rowSize
,
&
timePrec
);
code
=
vnodeRetrieveQueryInfo
((
void
*
)(
pRetrieve
->
qhandle
),
&
numOfRows
,
&
rowSize
,
&
timePrec
);
}
}
else
{
}
else
{
dError
(
"QInfo:%p, qhandle:%p is not matched with saved:%p"
,
pObj
->
qhandle
,
pRetrieve
->
qhandle
,
pObj
->
qhandle
);
dError
(
"QInfo:%p, qhandle:%p is not matched with saved:%p"
,
pObj
->
qhandle
,
pRetrieve
->
qhandle
,
pObj
->
qhandle
);
code
=
TSDB_CODE_INVALID_QHANDLE
;
code
=
TSDB_CODE_INVALID_QHANDLE
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录