Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
6d28d01b
T
TDengine
项目概览
taosdata
/
TDengine
接近 2 年 前同步成功
通知
1191
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看板
提交
6d28d01b
编写于
12月 05, 2020
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
TD-2165
上级
8b8c7948
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
17 addition
and
14 deletion
+17
-14
src/vnode/inc/vnodeCancel.h
src/vnode/inc/vnodeCancel.h
+1
-1
src/vnode/src/vnodeCancel.c
src/vnode/src/vnodeCancel.c
+14
-11
src/vnode/src/vnodeRead.c
src/vnode/src/vnodeRead.c
+2
-2
未找到文件。
src/vnode/inc/vnodeCancel.h
浏览文件 @
6d28d01b
...
@@ -24,7 +24,7 @@ extern "C" {
...
@@ -24,7 +24,7 @@ extern "C" {
int32_t
vnodeInitCWorker
();
int32_t
vnodeInitCWorker
();
void
vnodeCleanupCWorker
();
void
vnodeCleanupCWorker
();
int32_t
vnodeWriteIntoCQueue
(
SVReadMsg
*
pRead
);
int32_t
vnodeWriteIntoCQueue
(
SV
nodeObj
*
pVnode
,
SV
ReadMsg
*
pRead
);
#ifdef __cplusplus
#ifdef __cplusplus
}
}
...
...
src/vnode/src/vnodeCancel.c
浏览文件 @
6d28d01b
...
@@ -120,17 +120,21 @@ void vnodeCleanupCWorker() {
...
@@ -120,17 +120,21 @@ void vnodeCleanupCWorker() {
vnodeStopCWorker
();
vnodeStopCWorker
();
}
}
int32_t
vnodeWriteIntoCQueue
(
SVReadMsg
*
pRead
)
{
int32_t
vnodeWriteIntoCQueue
(
SVnodeObj
*
pVnode
,
SVReadMsg
*
pRead
)
{
vTrace
(
"msg:%p, write into vcqueue"
,
pRead
);
atomic_add_fetch_32
(
&
pVnode
->
refCount
,
1
);
pRead
->
pVnode
=
pVnode
;
vTrace
(
"vgId:%d, write into vcqueue, refCount:%d queued:%d"
,
pVnode
->
vgId
,
pVnode
->
refCount
,
pVnode
->
queuedRMsg
);
return
taosWriteQitem
(
tsVCWorkerQueue
,
pRead
->
qtype
,
pRead
);
return
taosWriteQitem
(
tsVCWorkerQueue
,
pRead
->
qtype
,
pRead
);
}
}
static
void
vnodeFreeFromCQueue
(
SVReadMsg
*
pRead
)
{
static
void
vnodeFreeFromCQueue
(
SV
nodeObj
*
pVnode
,
SV
ReadMsg
*
pRead
)
{
vTrace
(
"
msg:%p, free from vcqueue"
,
pRead
);
vTrace
(
"
vgId:%d, free from vcqueue, refCount:%d queued:%d"
,
pVnode
->
vgId
,
pVnode
->
refCount
,
pVnode
->
queuedRMsg
);
taosFreeQitem
(
pRead
);
taosFreeQitem
(
pRead
);
vnodeRelease
(
pVnode
);
}
}
static
void
vnodeSendVCancelRpcRsp
(
SVReadMsg
*
pRead
,
int32_t
code
)
{
static
void
vnodeSendVCancelRpcRsp
(
SV
nodeObj
*
pVnode
,
SV
ReadMsg
*
pRead
,
int32_t
code
)
{
SRpcMsg
rpcRsp
=
{
SRpcMsg
rpcRsp
=
{
.
handle
=
pRead
->
rpcHandle
,
.
handle
=
pRead
->
rpcHandle
,
.
pCont
=
pRead
->
rspRet
.
rsp
,
.
pCont
=
pRead
->
rspRet
.
rsp
,
...
@@ -139,7 +143,7 @@ static void vnodeSendVCancelRpcRsp(SVReadMsg *pRead, int32_t code) {
...
@@ -139,7 +143,7 @@ static void vnodeSendVCancelRpcRsp(SVReadMsg *pRead, int32_t code) {
};
};
rpcSendResponse
(
&
rpcRsp
);
rpcSendResponse
(
&
rpcRsp
);
vnodeFreeFromCQueue
(
pRead
);
vnodeFreeFromCQueue
(
p
Vnode
,
p
Read
);
}
}
static
void
*
vnodeCWorkerFunc
(
void
*
param
)
{
static
void
*
vnodeCWorkerFunc
(
void
*
param
)
{
...
@@ -153,13 +157,12 @@ static void *vnodeCWorkerFunc(void *param) {
...
@@ -153,13 +157,12 @@ static void *vnodeCWorkerFunc(void *param) {
break
;
break
;
}
}
vTrace
(
"msg:%p will be processed in vcworker queue"
,
pRead
);
assert
(
qtype
==
TAOS_QTYPE_RPC
);
assert
(
qtype
==
TAOS_QTYPE_RPC
);
assert
(
pVnode
==
NULL
);
assert
(
pVnode
==
NULL
);
assert
(
pRead
->
pVnode
!=
NULL
);
int32_t
code
=
vnodeProcessRead
(
NULL
,
pRead
);
vnodeSendVCancelRpcRsp
(
pRead
,
code
);
int32_t
code
=
vnodeProcessRead
(
pRead
->
pVnode
,
pRead
);
vnodeSendVCancelRpcRsp
(
pRead
->
pVnode
,
pRead
,
code
);
}
}
return
NULL
;
return
NULL
;
...
...
src/vnode/src/vnodeRead.c
浏览文件 @
6d28d01b
...
@@ -116,9 +116,9 @@ int32_t vnodeWriteToRQueue(void *vparam, void *pCont, int32_t contLen, int8_t qt
...
@@ -116,9 +116,9 @@ int32_t vnodeWriteToRQueue(void *vparam, void *pCont, int32_t contLen, int8_t qt
}
}
pRead
->
qtype
=
qtype
;
pRead
->
qtype
=
qtype
;
if
(
pRead
->
msgType
==
TSDB_MSG_TYPE_CM_KILL_QUERY
)
{
if
(
pRead
->
msgType
==
TSDB_MSG_TYPE_CM_KILL_QUERY
)
{
return
vnodeWriteIntoCQueue
(
pRead
);
return
vnodeWriteIntoCQueue
(
p
Vnode
,
p
Read
);
}
else
{
}
else
{
atomic_add_fetch_32
(
&
pVnode
->
refCount
,
1
);
atomic_add_fetch_32
(
&
pVnode
->
refCount
,
1
);
atomic_add_fetch_32
(
&
pVnode
->
queuedRMsg
,
1
);
atomic_add_fetch_32
(
&
pVnode
->
queuedRMsg
,
1
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录