Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
930b267a
T
TDengine
项目概览
taosdata
/
TDengine
11 个月 前同步成功
通知
1178
Star
22014
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看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
930b267a
编写于
4月 17, 2023
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(stream): set the correct start offset for stream task.
上级
4ed26bbc
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
16 addition
and
12 deletion
+16
-12
source/libs/stream/src/streamDispatch.c
source/libs/stream/src/streamDispatch.c
+5
-7
source/libs/stream/src/streamExec.c
source/libs/stream/src/streamExec.c
+4
-1
source/libs/stream/src/streamMeta.c
source/libs/stream/src/streamMeta.c
+1
-2
source/libs/stream/src/streamRecover.c
source/libs/stream/src/streamRecover.c
+6
-2
未找到文件。
source/libs/stream/src/streamDispatch.c
浏览文件 @
930b267a
...
@@ -230,23 +230,21 @@ int32_t streamDispatchOneCheckReq(SStreamTask* pTask, const SStreamTaskCheckReq*
...
@@ -230,23 +230,21 @@ int32_t streamDispatchOneCheckReq(SStreamTask* pTask, const SStreamTaskCheckReq*
SEncoder
encoder
;
SEncoder
encoder
;
tEncoderInit
(
&
encoder
,
abuf
,
tlen
);
tEncoderInit
(
&
encoder
,
abuf
,
tlen
);
if
((
code
=
tEncodeSStreamTaskCheckReq
(
&
encoder
,
pReq
))
<
0
)
{
if
((
code
=
tEncodeSStreamTaskCheckReq
(
&
encoder
,
pReq
))
<
0
)
{
goto
FAIL
;
rpcFreeCont
(
buf
);
return
code
;
}
}
tEncoderClear
(
&
encoder
);
tEncoderClear
(
&
encoder
);
msg
.
contLen
=
tlen
+
sizeof
(
SMsgHead
);
msg
.
contLen
=
tlen
+
sizeof
(
SMsgHead
);
msg
.
pCont
=
buf
;
msg
.
pCont
=
buf
;
msg
.
msgType
=
TDMT_STREAM_TASK_CHECK
;
msg
.
msgType
=
TDMT_STREAM_TASK_CHECK
;
qDebug
(
"dispatch from s-task:%s to downstream s-task:%"
PRIx64
":%d node %d: check msg"
,
pTask
->
id
.
idStr
,
qDebug
(
"dispatch from s-task:%s to downstream s-task:%"
PRIx64
":%d node %d: check msg"
,
pTask
->
id
.
idStr
,
pReq
->
streamId
,
pReq
->
downstreamTaskId
,
nodeId
);
pReq
->
streamId
,
pReq
->
downstreamTaskId
,
nodeId
);
tmsgSendReq
(
pEpSet
,
&
msg
);
tmsgSendReq
(
pEpSet
,
&
msg
);
return
0
;
return
0
;
FAIL:
if
(
buf
)
rpcFreeCont
(
buf
);
return
code
;
}
}
int32_t
streamDispatchOneRecoverFinishReq
(
SStreamTask
*
pTask
,
const
SStreamRecoverFinishReq
*
pReq
,
int32_t
vgId
,
int32_t
streamDispatchOneRecoverFinishReq
(
SStreamTask
*
pTask
,
const
SStreamRecoverFinishReq
*
pReq
,
int32_t
vgId
,
...
...
source/libs/stream/src/streamExec.c
浏览文件 @
930b267a
...
@@ -189,7 +189,10 @@ int32_t streamScanExec(SStreamTask* pTask, int32_t batchSz) {
...
@@ -189,7 +189,10 @@ int32_t streamScanExec(SStreamTask* pTask, int32_t batchSz) {
qDebug
(
"task %d scan exec dispatch block num %d"
,
pTask
->
id
.
taskId
,
batchCnt
);
qDebug
(
"task %d scan exec dispatch block num %d"
,
pTask
->
id
.
taskId
,
batchCnt
);
streamDispatch
(
pTask
);
streamDispatch
(
pTask
);
}
}
if
(
finished
)
break
;
if
(
finished
)
{
break
;
}
}
}
return
0
;
return
0
;
}
}
...
...
source/libs/stream/src/streamMeta.c
浏览文件 @
930b267a
...
@@ -296,8 +296,7 @@ int32_t streamLoadTasks(SStreamMeta* pMeta, int64_t ver) {
...
@@ -296,8 +296,7 @@ int32_t streamLoadTasks(SStreamMeta* pMeta, int64_t ver) {
tDecodeStreamTask
(
&
decoder
,
pTask
);
tDecodeStreamTask
(
&
decoder
,
pTask
);
tDecoderClear
(
&
decoder
);
tDecoderClear
(
&
decoder
);
// todo set correct initial version.
if
(
pMeta
->
expandFunc
(
pMeta
->
ahandle
,
pTask
,
pTask
->
chkInfo
.
version
)
<
0
)
{
if
(
pMeta
->
expandFunc
(
pMeta
->
ahandle
,
pTask
,
0
)
<
0
)
{
tdbFree
(
pKey
);
tdbFree
(
pKey
);
tdbFree
(
pVal
);
tdbFree
(
pVal
);
tdbTbcClose
(
pCur
);
tdbTbcClose
(
pCur
);
...
...
source/libs/stream/src/streamRecover.c
浏览文件 @
930b267a
...
@@ -102,8 +102,10 @@ int32_t streamRecheckOneDownstream(SStreamTask* pTask, const SStreamTaskCheckRsp
...
@@ -102,8 +102,10 @@ int32_t streamRecheckOneDownstream(SStreamTask* pTask, const SStreamTaskCheckRsp
.
downstreamNodeId
=
pRsp
->
downstreamNodeId
,
.
downstreamNodeId
=
pRsp
->
downstreamNodeId
,
.
childId
=
pRsp
->
childId
,
.
childId
=
pRsp
->
childId
,
};
};
qDebug
(
"task %d at node %d check downstream task %d at node %d (recheck)"
,
pTask
->
id
.
taskId
,
pTask
->
nodeId
,
qDebug
(
"s-task:%s at node %d check downstream task %d at node %d (recheck)"
,
pTask
->
id
.
idStr
,
pTask
->
nodeId
,
req
.
downstreamTaskId
,
req
.
downstreamNodeId
);
req
.
downstreamTaskId
,
req
.
downstreamNodeId
);
if
(
pTask
->
outputType
==
TASK_OUTPUT__FIXED_DISPATCH
)
{
if
(
pTask
->
outputType
==
TASK_OUTPUT__FIXED_DISPATCH
)
{
streamDispatchOneCheckReq
(
pTask
,
&
req
,
pRsp
->
downstreamNodeId
,
&
pTask
->
fixedEpDispatcher
.
epSet
);
streamDispatchOneCheckReq
(
pTask
,
&
req
,
pRsp
->
downstreamNodeId
,
&
pTask
->
fixedEpDispatcher
.
epSet
);
}
else
if
(
pTask
->
outputType
==
TASK_OUTPUT__SHUFFLE_DISPATCH
)
{
}
else
if
(
pTask
->
outputType
==
TASK_OUTPUT__SHUFFLE_DISPATCH
)
{
...
@@ -116,6 +118,7 @@ int32_t streamRecheckOneDownstream(SStreamTask* pTask, const SStreamTaskCheckRsp
...
@@ -116,6 +118,7 @@ int32_t streamRecheckOneDownstream(SStreamTask* pTask, const SStreamTaskCheckRsp
}
}
}
}
}
}
return
0
;
return
0
;
}
}
...
@@ -158,9 +161,10 @@ int32_t streamProcessTaskCheckRsp(SStreamTask* pTask, const SStreamTaskCheckRsp*
...
@@ -158,9 +161,10 @@ int32_t streamProcessTaskCheckRsp(SStreamTask* pTask, const SStreamTaskCheckRsp*
}
else
{
}
else
{
ASSERT
(
0
);
ASSERT
(
0
);
}
}
}
else
{
}
else
{
// not ready, it should wait for at least 100ms and then retry
streamRecheckOneDownstream
(
pTask
,
pRsp
);
streamRecheckOneDownstream
(
pTask
,
pRsp
);
}
}
return
0
;
return
0
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录