Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
cbda61c7
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看板
提交
cbda61c7
编写于
7月 11, 2023
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(stream): fix error in checkpointing.
上级
184b2d64
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
24 addition
and
11 deletion
+24
-11
source/libs/stream/src/streamCheckpoint.c
source/libs/stream/src/streamCheckpoint.c
+0
-1
source/libs/stream/src/streamExec.c
source/libs/stream/src/streamExec.c
+24
-10
未找到文件。
source/libs/stream/src/streamCheckpoint.c
浏览文件 @
cbda61c7
...
...
@@ -204,7 +204,6 @@ int32_t streamProcessCheckpointSourceReq(SStreamMeta* pMeta, SStreamTask* pTask,
}
int32_t
streamProcessCheckpointReq
(
SStreamTask
*
pTask
,
SStreamCheckpointReq
*
pReq
)
{
int32_t
code
;
int64_t
checkpointId
=
pReq
->
checkpointId
;
int32_t
childId
=
pReq
->
childId
;
...
...
source/libs/stream/src/streamExec.c
浏览文件 @
cbda61c7
...
...
@@ -301,11 +301,11 @@ int32_t updateCheckPointInfo(SStreamTask* pTask, int64_t checkpointId) {
qGetCheckpointVersion
(
pTask
->
exec
.
pExecutor
,
&
dataVer
,
&
ckId
);
SCheckpointInfo
*
pCkInfo
=
&
pTask
->
chkInfo
;
qDebug
(
"s-task:%s exec end, start to update check point, ver from %"
PRId64
" to %"
PRId64
", checkpointId:%"
PRId64
" -> %"
PRId64
,
pTask
->
id
.
idStr
,
pCkInfo
->
version
,
dataVer
,
pCkInfo
->
keptCheckpointId
,
checkpointId
);
//
qDebug("s-task:%s exec end, start to update check point, ver from %" PRId64 " to %" PRId64 ", checkpointId:%" PRId64
//
" -> %" PRId64,
//
pTask->id.idStr, pCkInfo->version, dataVer, pCkInfo->keptCheckpointId, checkpointId);
pCkInfo
->
keptCheckpointId
=
checkpointId
;
pCkInfo
->
version
=
dataVer
;
//
pCkInfo->version = dataVer;
return
TSDB_CODE_SUCCESS
;
}
...
...
@@ -418,6 +418,7 @@ int32_t streamExecForAll(SStreamTask* pTask) {
int64_t
st
=
taosGetTimestampMs
();
qDebug
(
"s-task:%s start to process batch of blocks, num:%d"
,
id
,
batchSize
);
int64_t
currentVer
=
pTask
->
chkInfo
.
currentVer
;
{
// set input
...
...
@@ -433,6 +434,8 @@ int32_t streamExecForAll(SStreamTask* pTask) {
qSetMultiStreamInput
(
pExecutor
,
&
pSubmit
->
submit
,
1
,
STREAM_INPUT__DATA_SUBMIT
);
qDebug
(
"s-task:%s set submit blocks as source block completed, %p %p len:%d ver:%"
PRId64
,
id
,
pSubmit
,
pSubmit
->
submit
.
msgStr
,
pSubmit
->
submit
.
msgLen
,
pSubmit
->
submit
.
ver
);
ASSERT
(
currentVer
<
pSubmit
->
submit
.
ver
);
currentVer
=
pSubmit
->
submit
.
ver
;
}
else
if
(
pItem
->
type
==
STREAM_INPUT__DATA_BLOCK
||
pItem
->
type
==
STREAM_INPUT__DATA_RETRIEVE
)
{
const
SStreamDataBlock
*
pBlock
=
(
const
SStreamDataBlock
*
)
pInput
;
...
...
@@ -445,8 +448,11 @@ int32_t streamExecForAll(SStreamTask* pTask) {
SArray
*
pBlockList
=
pMerged
->
submits
;
int32_t
numOfBlocks
=
taosArrayGetSize
(
pBlockList
);
qDebug
(
"s-task:%s %p set (merged) submit blocks as a batch, numOfBlocks:%d"
,
id
,
pTask
,
numOfBlocks
);
qDebug
(
"s-task:%s %p set (merged) submit blocks as a batch, numOfBlocks:%d, ver:%"
PRId64
,
id
,
pTask
,
numOfBlocks
,
pMerged
->
ver
);
qSetMultiStreamInput
(
pExecutor
,
pBlockList
->
pData
,
numOfBlocks
,
STREAM_INPUT__MERGED_SUBMIT
);
ASSERT
(
currentVer
<
pMerged
->
ver
);
currentVer
=
pMerged
->
ver
;
}
else
if
(
pItem
->
type
==
STREAM_INPUT__REF_DATA_BLOCK
)
{
const
SStreamRefDataBlock
*
pRefBlock
=
(
const
SStreamRefDataBlock
*
)
pInput
;
qSetMultiStreamInput
(
pExecutor
,
pRefBlock
->
pBlock
,
1
,
STREAM_INPUT__DATA_BLOCK
);
...
...
@@ -466,6 +472,13 @@ int32_t streamExecForAll(SStreamTask* pTask) {
qDebug
(
"s-task:%s batch of input blocks exec end, elapsed time:%.2fs, result size:%.2fMiB, numOfBlocks:%d"
,
id
,
el
,
resSize
/
1048576
.
0
,
totalBlocks
);
// update the currentVer if processing the submit blocks.
if
(
currentVer
>
pTask
->
chkInfo
.
currentVer
)
{
qDebug
(
"s-task:%s update currentVer from %"
PRId64
" to %"
PRId64
,
pTask
->
id
.
idStr
,
pTask
->
chkInfo
.
currentVer
,
currentVer
);
pTask
->
chkInfo
.
currentVer
=
currentVer
;
}
int32_t
type
=
pInput
->
type
;
streamFreeQitem
(
pInput
);
...
...
@@ -524,15 +537,16 @@ int32_t streamTryExec(SStreamTask* pTask) {
if
(
remain
==
0
)
{
// all tasks are in TASK_STATUS__CK_READY state
streamBackendDoCheckpoint
(
pMeta
,
pTask
->
checkpointingId
);
qDebug
(
"vgId:%d do vnode wide checkpoint completed, checkpoint
i
d:%"
PRId64
,
pMeta
->
vgId
);
qDebug
(
"vgId:%d do vnode wide checkpoint completed, checkpoint
I
d:%"
PRId64
,
pMeta
->
vgId
);
}
if
(
pTask
->
info
.
taskLevel
!=
TASK_LEVEL__SINK
)
{
code
=
updateCheckPointInfo
(
pTask
,
pTask
->
checkpointingId
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
return
code
;
}
//
code = updateCheckPointInfo(pTask, pTask->checkpointingId);
//
if (code != TSDB_CODE_SUCCESS) {
//
return code;
//
}
}
// send check point response to upstream task
if
(
pTask
->
info
.
taskLevel
==
TASK_LEVEL__SOURCE
)
{
code
=
streamTaskSendCheckpointSourceRsp
(
pTask
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录