Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
c158087d
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1187
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看板
提交
c158087d
编写于
3月 28, 2023
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(tmq): kill the ongoing tsdb scans while transferring the ownership of vnode to other consumers.
上级
5c128e22
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
19 addition
and
15 deletion
+19
-15
include/libs/executor/executor.h
include/libs/executor/executor.h
+1
-9
source/dnode/vnode/src/tq/tq.c
source/dnode/vnode/src/tq/tq.c
+1
-6
source/libs/executor/src/executor.c
source/libs/executor/src/executor.c
+17
-0
未找到文件。
include/libs/executor/executor.h
浏览文件 @
c158087d
...
...
@@ -149,7 +149,6 @@ int32_t qGetQueryTableSchemaVersion(qTaskInfo_t tinfo, char* dbName, char* table
* @param handle
* @return
*/
int32_t
qExecTaskOpt
(
qTaskInfo_t
tinfo
,
SArray
*
pResList
,
uint64_t
*
useconds
,
bool
*
hasMore
,
SLocalFetch
*
pLocal
);
int32_t
qExecTask
(
qTaskInfo_t
tinfo
,
SSDataBlock
**
pBlock
,
uint64_t
*
useconds
);
...
...
@@ -162,6 +161,7 @@ void qCleanExecTaskBlockBuf(qTaskInfo_t tinfo);
* @return
*/
int32_t
qAsyncKillTask
(
qTaskInfo_t
tinfo
,
int32_t
rspCode
);
int32_t
qKillTask
(
qTaskInfo_t
tinfo
,
int32_t
rspCode
);
bool
qTaskIsExecuting
(
qTaskInfo_t
qinfo
);
...
...
@@ -171,14 +171,6 @@ bool qTaskIsExecuting(qTaskInfo_t qinfo);
*/
void
qDestroyTask
(
qTaskInfo_t
tinfo
);
/**
* Extract the qualified table id list, and than pass them to the TSDB driver to load the required table data blocks.
*
* @param iter the table iterator to traverse all tables belongs to a super table, or an invert index
* @return
*/
int32_t
qGetQualifiedTableIdList
(
void
*
pTableList
,
const
char
*
tagCond
,
int32_t
tagCondLen
,
SArray
*
pTableIdList
);
void
qProcessRspMsg
(
void
*
parent
,
struct
SRpcMsg
*
pMsg
,
struct
SEpSet
*
pEpSet
);
int32_t
qGetExplainExecInfo
(
qTaskInfo_t
tinfo
,
SArray
*
pExecInfoList
/*,int32_t* resNum, SExplainExecInfo** pRes*/
);
...
...
source/dnode/vnode/src/tq/tq.c
浏览文件 @
c158087d
...
...
@@ -888,7 +888,7 @@ int32_t tqProcessSubscribeReq(STQ* pTq, int64_t sversion, char* msg, int32_t msg
// kill executing task
qTaskInfo_t
pTaskInfo
=
pHandle
->
execHandle
.
task
;
if
(
pTaskInfo
!=
NULL
)
{
// qAsyncKillTask(pTaskInfo
);
qKillTask
(
pTaskInfo
,
TSDB_CODE_SUCCESS
);
}
taosWLockLatch
(
&
pTq
->
lock
);
...
...
@@ -904,11 +904,6 @@ int32_t tqProcessSubscribeReq(STQ* pTq, int64_t sversion, char* msg, int32_t msg
qStreamCloseTsdbReader
(
pTaskInfo
);
}
// reset the error code.
if
(
pHandle
->
execHandle
.
task
!=
NULL
)
{
}
taosWUnLockLatch
(
&
pTq
->
lock
);
if
(
tqMetaSaveHandle
(
pTq
,
req
.
subKey
,
pHandle
)
<
0
)
{
taosMemoryFree
(
req
.
qmsg
);
...
...
source/libs/executor/src/executor.c
浏览文件 @
c158087d
...
...
@@ -749,6 +749,23 @@ int32_t qAsyncKillTask(qTaskInfo_t qinfo, int32_t rspCode) {
return
TSDB_CODE_SUCCESS
;
}
int32_t
qKillTask
(
qTaskInfo_t
tinfo
,
int32_t
rspCode
)
{
SExecTaskInfo
*
pTaskInfo
=
(
SExecTaskInfo
*
)
tinfo
;
if
(
pTaskInfo
==
NULL
)
{
return
TSDB_CODE_QRY_INVALID_QHANDLE
;
}
qDebug
(
"%s execTask async killed"
,
GET_TASKID
(
pTaskInfo
));
setTaskKilled
(
pTaskInfo
,
rspCode
);
while
(
qTaskIsExecuting
(
pTaskInfo
))
{
taosMsleep
(
10
);
}
pTaskInfo
->
code
=
rspCode
;
return
TSDB_CODE_SUCCESS
;
}
bool
qTaskIsExecuting
(
qTaskInfo_t
qinfo
)
{
SExecTaskInfo
*
pTaskInfo
=
(
SExecTaskInfo
*
)
qinfo
;
if
(
NULL
==
pTaskInfo
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录