Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
ed612088
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
提交
ed612088
编写于
5月 23, 2023
作者:
wmmhello
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:lost data because tsdbreader or task is killed
上级
d8387b95
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
12 addition
and
12 deletion
+12
-12
include/libs/executor/executor.h
include/libs/executor/executor.h
+1
-1
source/dnode/vnode/src/tq/tq.c
source/dnode/vnode/src/tq/tq.c
+7
-7
source/libs/executor/src/executor.c
source/libs/executor/src/executor.c
+4
-4
未找到文件。
include/libs/executor/executor.h
浏览文件 @
ed612088
...
@@ -90,7 +90,7 @@ qTaskInfo_t qCreateQueueExecTaskInfo(void* msg, SReadHandle* pReaderHandle, int3
...
@@ -90,7 +90,7 @@ qTaskInfo_t qCreateQueueExecTaskInfo(void* msg, SReadHandle* pReaderHandle, int3
*/
*/
void
qSetTaskId
(
qTaskInfo_t
tinfo
,
uint64_t
taskId
,
uint64_t
queryId
);
void
qSetTaskId
(
qTaskInfo_t
tinfo
,
uint64_t
taskId
,
uint64_t
queryId
);
void
qSetTaskCode
(
qTaskInfo_t
tinfo
,
int32_t
code
);
//
void qSetTaskCode(qTaskInfo_t tinfo, int32_t code);
int32_t
qSetStreamOpOpen
(
qTaskInfo_t
tinfo
);
int32_t
qSetStreamOpOpen
(
qTaskInfo_t
tinfo
);
...
...
source/dnode/vnode/src/tq/tq.c
浏览文件 @
ed612088
...
@@ -370,7 +370,7 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg) {
...
@@ -370,7 +370,7 @@ int32_t tqProcessPollReq(STQ* pTq, SRpcMsg* pMsg) {
bool
exec
=
tqIsHandleExec
(
pHandle
);
bool
exec
=
tqIsHandleExec
(
pHandle
);
if
(
!
exec
)
{
if
(
!
exec
)
{
tqSetHandleExec
(
pHandle
);
tqSetHandleExec
(
pHandle
);
qSetTaskCode
(
pHandle
->
execHandle
.
task
,
TDB_CODE_SUCCESS
);
//
qSetTaskCode(pHandle->execHandle.task, TDB_CODE_SUCCESS);
tqDebug
(
"tmq poll: consumer:0x%"
PRIx64
"vgId:%d, topic:%s, set handle exec, pHandle:%p"
,
consumerId
,
vgId
,
req
.
subKey
,
pHandle
);
tqDebug
(
"tmq poll: consumer:0x%"
PRIx64
"vgId:%d, topic:%s, set handle exec, pHandle:%p"
,
consumerId
,
vgId
,
req
.
subKey
,
pHandle
);
taosWUnLockLatch
(
&
pTq
->
lock
);
taosWUnLockLatch
(
&
pTq
->
lock
);
break
;
break
;
...
@@ -572,16 +572,16 @@ int32_t tqProcessSubscribeReq(STQ* pTq, int64_t sversion, char* msg, int32_t msg
...
@@ -572,16 +572,16 @@ int32_t tqProcessSubscribeReq(STQ* pTq, int64_t sversion, char* msg, int32_t msg
// atomic_add_fetch_32(&pHandle->epoch, 1);
// atomic_add_fetch_32(&pHandle->epoch, 1);
// kill executing task
// kill executing task
if
(
tqIsHandleExec
(
pHandle
))
{
//
if(tqIsHandleExec(pHandle)) {
qTaskInfo_t
pTaskInfo
=
pHandle
->
execHandle
.
task
;
//
qTaskInfo_t pTaskInfo = pHandle->execHandle.task;
if
(
pTaskInfo
!=
NULL
)
{
//
if (pTaskInfo != NULL) {
qKillTask
(
pTaskInfo
,
TSDB_CODE_SUCCESS
);
//
qKillTask(pTaskInfo, TSDB_CODE_SUCCESS);
}
//
}
// if (pHandle->execHandle.subType == TOPIC_SUB_TYPE__COLUMN) {
// if (pHandle->execHandle.subType == TOPIC_SUB_TYPE__COLUMN) {
// qStreamCloseTsdbReader(pTaskInfo);
// qStreamCloseTsdbReader(pTaskInfo);
// }
// }
}
//
}
// remove if it has been register in the push manager, and return one empty block to consumer
// remove if it has been register in the push manager, and return one empty block to consumer
tqUnregisterPushHandle
(
pTq
,
pHandle
);
tqUnregisterPushHandle
(
pTq
,
pHandle
);
taosWUnLockLatch
(
&
pTq
->
lock
);
taosWUnLockLatch
(
&
pTq
->
lock
);
...
...
source/libs/executor/src/executor.c
浏览文件 @
ed612088
...
@@ -180,10 +180,10 @@ void qSetTaskId(qTaskInfo_t tinfo, uint64_t taskId, uint64_t queryId) {
...
@@ -180,10 +180,10 @@ void qSetTaskId(qTaskInfo_t tinfo, uint64_t taskId, uint64_t queryId) {
doSetTaskId
(
pTaskInfo
->
pRoot
);
doSetTaskId
(
pTaskInfo
->
pRoot
);
}
}
void
qSetTaskCode
(
qTaskInfo_t
tinfo
,
int32_t
code
)
{
//
void qSetTaskCode(qTaskInfo_t tinfo, int32_t code) {
SExecTaskInfo
*
pTaskInfo
=
tinfo
;
//
SExecTaskInfo* pTaskInfo = tinfo;
pTaskInfo
->
code
=
code
;
//
pTaskInfo->code = code;
}
//
}
int32_t
qSetStreamOpOpen
(
qTaskInfo_t
tinfo
)
{
int32_t
qSetStreamOpOpen
(
qTaskInfo_t
tinfo
)
{
if
(
tinfo
==
NULL
)
{
if
(
tinfo
==
NULL
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录