Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
65b81a80
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
提交
65b81a80
编写于
5月 31, 2023
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: do some internal refactor and add some logs.
上级
fa5c024b
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
9 addition
and
3 deletion
+9
-3
source/libs/stream/src/stream.c
source/libs/stream/src/stream.c
+3
-1
source/libs/stream/src/streamDispatch.c
source/libs/stream/src/streamDispatch.c
+6
-2
未找到文件。
source/libs/stream/src/stream.c
浏览文件 @
65b81a80
...
...
@@ -237,7 +237,7 @@ int32_t streamProcessDispatchRsp(SStreamTask* pTask, SStreamDispatchRsp* pRsp, i
if
(
pTask
->
outputType
==
TASK_OUTPUT__SHUFFLE_DISPATCH
)
{
int32_t
leftRsp
=
atomic_sub_fetch_32
(
&
pTask
->
shuffleDispatcher
.
waitingRspCnt
,
1
);
qDebug
(
"
task %d is shuffle, left waiting rsp %d"
,
pTask
->
id
.
taskId
,
leftRsp
);
qDebug
(
"
s-task:%s is shuffle, left waiting rsp %d"
,
pTask
->
id
.
idStr
,
leftRsp
);
if
(
leftRsp
>
0
)
{
return
0
;
}
...
...
@@ -246,6 +246,8 @@ int32_t streamProcessDispatchRsp(SStreamTask* pTask, SStreamDispatchRsp* pRsp, i
int8_t
old
=
atomic_exchange_8
(
&
pTask
->
outputStatus
,
pRsp
->
inputStatus
);
ASSERT
(
old
==
TASK_OUTPUT_STATUS__WAIT
);
qDebug
(
"s-task:%s receive dispatch rsp, output status:%d"
,
pTask
->
id
.
idStr
,
pTask
->
outputStatus
);
// the input queue of the (down stream) task that receive the output data is full, so the TASK_INPUT_STATUS_BLOCKED is rsp
// todo we need to send EMPTY PACKAGE to detect if the input queue is available for output of upstream task, every 50 ms.
if
(
pRsp
->
inputStatus
==
TASK_INPUT_STATUS__BLOCKED
)
{
...
...
source/libs/stream/src/streamDispatch.c
浏览文件 @
65b81a80
...
...
@@ -510,14 +510,17 @@ int32_t streamDispatchStreamBlock(SStreamTask* pTask) {
int8_t
old
=
atomic_val_compare_exchange_8
(
&
pTask
->
outputStatus
,
TASK_OUTPUT_STATUS__NORMAL
,
TASK_OUTPUT_STATUS__WAIT
);
if
(
old
!=
TASK_OUTPUT_STATUS__NORMAL
)
{
qDebug
(
"s-task:%s task wait for dispatch rsp, not dispatch now
"
,
pTask
->
id
.
idStr
);
qDebug
(
"s-task:%s task wait for dispatch rsp, not dispatch now
, output status:%d"
,
pTask
->
id
.
idStr
,
old
);
return
0
;
}
qDebug
(
"s-task:%s start to dispatch msg, output status:%d"
,
pTask
->
id
.
idStr
,
pTask
->
outputStatus
);
SStreamDataBlock
*
pDispatchedBlock
=
streamQueueNextItem
(
pTask
->
outputQueue
);
if
(
pDispatchedBlock
==
NULL
)
{
qDebug
(
"s-task:%s stop dispatching since no output in output queue"
,
pTask
->
id
.
idStr
);
atomic_store_8
(
&
pTask
->
outputStatus
,
TASK_OUTPUT_STATUS__NORMAL
);
qDebug
(
"s-task:%s stop dispatching since no output in output queue, output status:%d"
,
pTask
->
id
.
idStr
,
pTask
->
outputStatus
);
return
0
;
}
...
...
@@ -527,6 +530,7 @@ int32_t streamDispatchStreamBlock(SStreamTask* pTask) {
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
streamQueueProcessFail
(
pTask
->
outputQueue
);
atomic_store_8
(
&
pTask
->
outputStatus
,
TASK_OUTPUT_STATUS__NORMAL
);
qDebug
(
"s-task:%s failed to dispatch msg to downstream, output status:%d"
,
pTask
->
id
.
idStr
,
pTask
->
outputStatus
);
}
// this block can be freed only when it has been pushed to down stream.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录