Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
75e6fb0f
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看板
提交
75e6fb0f
编写于
8月 12, 2023
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: do some internal refactor.
上级
075b5e94
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
13 addition
and
3 deletion
+13
-3
include/libs/stream/tstream.h
include/libs/stream/tstream.h
+2
-1
source/libs/stream/src/stream.c
source/libs/stream/src/stream.c
+10
-1
source/libs/stream/src/streamDispatch.c
source/libs/stream/src/streamDispatch.c
+1
-1
未找到文件。
include/libs/stream/tstream.h
浏览文件 @
75e6fb0f
...
...
@@ -403,7 +403,7 @@ typedef struct {
int64_t
streamId
;
int32_t
type
;
int32_t
taskId
;
int32_t
dataS
rcVgId
;
int32_t
s
rcVgId
;
int32_t
upstreamTaskId
;
int32_t
upstreamChildId
;
int32_t
upstreamNodeId
;
...
...
@@ -582,6 +582,7 @@ int32_t streamSetupScheduleTrigger(SStreamTask* pTask);
int32_t
streamProcessRunReq
(
SStreamTask
*
pTask
);
int32_t
streamProcessDispatchMsg
(
SStreamTask
*
pTask
,
SStreamDispatchReq
*
pReq
,
SRpcMsg
*
pMsg
,
bool
exec
);
int32_t
streamProcessDispatchRsp
(
SStreamTask
*
pTask
,
SStreamDispatchRsp
*
pRsp
,
int32_t
code
);
void
streamTaskCloseUpstreamInput
(
SStreamTask
*
pTask
,
int32_t
taskId
);
int32_t
streamProcessRetrieveReq
(
SStreamTask
*
pTask
,
SStreamRetrieveReq
*
pReq
,
SRpcMsg
*
pMsg
);
...
...
source/libs/stream/src/stream.c
浏览文件 @
75e6fb0f
...
...
@@ -145,7 +145,7 @@ int32_t streamSchedExec(SStreamTask* pTask) {
int32_t
streamTaskEnqueueBlocks
(
SStreamTask
*
pTask
,
const
SStreamDispatchReq
*
pReq
,
SRpcMsg
*
pRsp
)
{
int8_t
status
=
0
;
SStreamDataBlock
*
pBlock
=
createStreamDataFromDispatchMsg
(
pReq
,
STREAM_INPUT__DATA_BLOCK
,
pReq
->
dataS
rcVgId
);
SStreamDataBlock
*
pBlock
=
createStreamDataFromDispatchMsg
(
pReq
,
STREAM_INPUT__DATA_BLOCK
,
pReq
->
s
rcVgId
);
if
(
pBlock
==
NULL
)
{
streamTaskInputFail
(
pTask
);
status
=
TASK_INPUT_STATUS__FAILED
;
...
...
@@ -235,6 +235,8 @@ int32_t streamTaskOutputResultBlock(SStreamTask* pTask, SStreamDataBlock* pBlock
return
0
;
}
static
int32_t
streamTaskAppendInputBlocks
(
SStreamTask
*
pTask
,
const
SStreamDispatchReq
*
pReq
)
{
int8_t
status
=
0
;
...
...
@@ -272,6 +274,13 @@ static int32_t buildDispatchRsp(const SStreamTask* pTask, const SStreamDispatchR
return
TSDB_CODE_SUCCESS
;
}
void
streamTaskCloseUpstreamInput
(
SStreamTask
*
pTask
,
int32_t
taskId
)
{
SStreamChildEpInfo
*
pInfo
=
streamTaskGetUpstreamTaskEpInfo
(
pTask
,
taskId
);
if
(
pInfo
!=
NULL
)
{
pInfo
->
dataAllowed
=
false
;
}
}
int32_t
streamProcessDispatchMsg
(
SStreamTask
*
pTask
,
SStreamDispatchReq
*
pReq
,
SRpcMsg
*
pRsp
,
bool
exec
)
{
qDebug
(
"s-task:%s receive dispatch msg from taskId:0x%x(vgId:%d), msgLen:%"
PRId64
,
pTask
->
id
.
idStr
,
pReq
->
upstreamTaskId
,
pReq
->
upstreamNodeId
,
pReq
->
totalLen
);
...
...
source/libs/stream/src/streamDispatch.c
浏览文件 @
75e6fb0f
...
...
@@ -36,7 +36,7 @@ static int32_t tEncodeStreamDispatchReq(SEncoder* pEncoder, const SStreamDispatc
if
(
tEncodeI64
(
pEncoder
,
pReq
->
streamId
)
<
0
)
return
-
1
;
if
(
tEncodeI32
(
pEncoder
,
pReq
->
taskId
)
<
0
)
return
-
1
;
if
(
tEncodeI32
(
pEncoder
,
pReq
->
upstreamTaskId
)
<
0
)
return
-
1
;
if
(
tEncodeI32
(
pEncoder
,
pReq
->
dataS
rcVgId
)
<
0
)
return
-
1
;
if
(
tEncodeI32
(
pEncoder
,
pReq
->
s
rcVgId
)
<
0
)
return
-
1
;
if
(
tEncodeI32
(
pEncoder
,
pReq
->
upstreamChildId
)
<
0
)
return
-
1
;
if
(
tEncodeI32
(
pEncoder
,
pReq
->
upstreamNodeId
)
<
0
)
return
-
1
;
if
(
tEncodeI32
(
pEncoder
,
pReq
->
blockNum
)
<
0
)
return
-
1
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录