Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
b0c5fa82
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1192
Star
22018
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
b0c5fa82
编写于
8月 23, 2023
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(stream): reset the task status.
上级
57ef43ba
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
30 addition
and
1 deletion
+30
-1
source/dnode/vnode/src/tq/tq.c
source/dnode/vnode/src/tq/tq.c
+1
-0
source/libs/stream/inc/streamInt.h
source/libs/stream/inc/streamInt.h
+1
-0
source/libs/stream/src/streamDispatch.c
source/libs/stream/src/streamDispatch.c
+11
-1
source/libs/stream/src/streamRecover.c
source/libs/stream/src/streamRecover.c
+17
-0
未找到文件。
source/dnode/vnode/src/tq/tq.c
浏览文件 @
b0c5fa82
...
...
@@ -1888,6 +1888,7 @@ int32_t tqProcessTaskUpdateReq(STQ* pTq, SRpcMsg* pMsg) {
streamTaskUpdateEpsetInfo
(
pTask
,
req
.
pNodeList
);
{
taosWLockLatch
(
&
pMeta
->
lock
);
streamSetStatusNormal
(
pTask
);
streamMetaSaveTask
(
pMeta
,
pTask
);
taosWUnLockLatch
(
&
pMeta
->
lock
);
}
...
...
source/libs/stream/inc/streamInt.h
浏览文件 @
b0c5fa82
...
...
@@ -71,6 +71,7 @@ int32_t streamTaskGetNumOfDownstream(const SStreamTask* pTask);
int32_t
extractBlocksFromInputQ
(
SStreamTask
*
pTask
,
SStreamQueueItem
**
pInput
,
int32_t
*
numOfBlocks
);
SStreamQueueItem
*
streamMergeQueueItem
(
SStreamQueueItem
*
dst
,
SStreamQueueItem
*
pElem
);
int32_t
streamTaskBuildScanhistoryRspMsg
(
SStreamTask
*
pTask
,
SStreamScanHistoryFinishReq
*
pReq
,
void
**
pBuffer
,
int32_t
*
pLen
);
int32_t
streamAddEndScanHistoryMsg
(
SStreamTask
*
pTask
,
SRpcHandleInfo
*
pRpcInfo
,
SStreamScanHistoryFinishReq
*
pReq
);
int32_t
streamNotifyUpstreamContinue
(
SStreamTask
*
pTask
);
int32_t
streamTaskFillHistoryFinished
(
SStreamTask
*
pTask
);
...
...
source/libs/stream/src/streamDispatch.c
浏览文件 @
b0c5fa82
...
...
@@ -848,7 +848,7 @@ int32_t tDecodeCompleteHistoryDataMsg(SDecoder* pDecoder, SStreamCompleteHistory
return
0
;
}
int32_t
stream
AddEndScanHistoryMsg
(
SStreamTask
*
pTask
,
SRpcHandleInfo
*
pRpcInfo
,
SStreamScanHistoryFinishReq
*
pReq
)
{
int32_t
stream
TaskBuildScanhistoryRspMsg
(
SStreamTask
*
pTask
,
SStreamScanHistoryFinishReq
*
pReq
,
void
**
pBuffer
,
int32_t
*
pLen
)
{
int32_t
len
=
0
;
int32_t
code
=
0
;
SEncoder
encoder
;
...
...
@@ -879,6 +879,16 @@ int32_t streamAddEndScanHistoryMsg(SStreamTask* pTask, SRpcHandleInfo* pRpcInfo,
tEncodeCompleteHistoryDataMsg
(
&
encoder
,
&
msg
);
tEncoderClear
(
&
encoder
);
*
pBuffer
=
pBuf
;
*
pLen
=
len
;
return
0
;
}
int32_t
streamAddEndScanHistoryMsg
(
SStreamTask
*
pTask
,
SRpcHandleInfo
*
pRpcInfo
,
SStreamScanHistoryFinishReq
*
pReq
)
{
void
*
pBuf
=
NULL
;
int32_t
len
=
0
;
streamTaskBuildScanhistoryRspMsg
(
pTask
,
pReq
,
&
pBuf
,
&
len
);
SStreamChildEpInfo
*
pInfo
=
streamTaskGetUpstreamTaskEpInfo
(
pTask
,
pReq
->
upstreamTaskId
);
SStreamContinueExecInfo
info
=
{.
taskId
=
pReq
->
upstreamTaskId
,
.
epset
=
pInfo
->
epSet
};
...
...
source/libs/stream/src/streamRecover.c
浏览文件 @
b0c5fa82
...
...
@@ -423,6 +423,23 @@ int32_t streamProcessScanHistoryFinishReq(SStreamTask* pTask, SStreamScanHistory
int32_t
taskLevel
=
pTask
->
info
.
taskLevel
;
ASSERT
(
taskLevel
==
TASK_LEVEL__AGG
||
taskLevel
==
TASK_LEVEL__SINK
);
if
(
pTask
->
status
.
taskStatus
!=
TASK_STATUS__SCAN_HISTORY
)
{
qError
(
"s-task:%s not in scan-history status, return upstream:0x%x scan-history finish directly"
,
pTask
->
id
.
idStr
,
pReq
->
upstreamTaskId
);
void
*
pBuf
=
NULL
;
int32_t
len
=
0
;
SRpcMsg
msg
=
{
0
};
streamTaskBuildScanhistoryRspMsg
(
pTask
,
pReq
,
&
pBuf
,
&
len
);
initRpcMsg
(
&
msg
,
0
,
pBuf
,
sizeof
(
SMsgHead
)
+
len
);
tmsgSendRsp
(
&
msg
);
qDebug
(
"s-task:%s level:%d notify upstream:0x%x(vgId:%d) to continue process data from WAL"
,
pTask
->
id
.
idStr
,
pTask
->
info
.
taskLevel
,
pReq
->
upstreamTaskId
,
pReq
->
upstreamNodeId
);
return
0
;
}
// sink tasks do not send end of scan history msg to its upstream, which is agg task.
streamAddEndScanHistoryMsg
(
pTask
,
pRpcInfo
,
pReq
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录