Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
03c26a9d
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看板
提交
03c26a9d
编写于
8月 12, 2023
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor
上级
afe9b848
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
10 addition
and
12 deletion
+10
-12
include/common/tcommon.h
include/common/tcommon.h
+1
-0
source/libs/stream/inc/streamInt.h
source/libs/stream/inc/streamInt.h
+0
-1
source/libs/stream/src/streamDispatch.c
source/libs/stream/src/streamDispatch.c
+9
-11
未找到文件。
include/common/tcommon.h
浏览文件 @
03c26a9d
...
...
@@ -170,6 +170,7 @@ typedef enum EStreamType {
STREAM_PULL_DATA
,
STREAM_PULL_OVER
,
STREAM_FILL_OVER
,
STREAM_CHECKPOINT
,
STREAM_CREATE_CHILD_TABLE
,
STREAM_TRANS_STATE
,
}
EStreamType
;
...
...
source/libs/stream/inc/streamInt.h
浏览文件 @
03c26a9d
...
...
@@ -52,7 +52,6 @@ int32_t streamBroadcastToChildren(SStreamTask* pTask, const SSDataBlock* pBlock)
int32_t
tEncodeStreamRetrieveReq
(
SEncoder
*
pEncoder
,
const
SStreamRetrieveReq
*
pReq
);
int32_t
doDispatchAllBlocks
(
SStreamTask
*
pTask
,
const
SStreamDataBlock
*
pData
);
int32_t
streamDispatchCheckMsg
(
SStreamTask
*
pTask
,
const
SStreamTaskCheckReq
*
pReq
,
int32_t
nodeId
,
SEpSet
*
pEpSet
);
int32_t
streamDoDispatchScanHistoryFinishMsg
(
SStreamTask
*
pTask
,
const
SStreamScanHistoryFinishReq
*
pReq
,
int32_t
vgId
,
...
...
source/libs/stream/src/streamDispatch.c
浏览文件 @
03c26a9d
...
...
@@ -440,9 +440,8 @@ int32_t streamSearchAndAddBlock(SStreamTask* pTask, SStreamDispatchReq* pReqs, S
return
0
;
}
int32_t
doDispatchAllBlocks
(
SStreamTask
*
pTask
,
const
SStreamDataBlock
*
pData
)
{
static
int32_t
doDispatchAllBlocks
(
SStreamTask
*
pTask
,
const
SStreamDataBlock
*
pData
)
{
int32_t
code
=
0
;
int32_t
numOfBlocks
=
taosArrayGetSize
(
pData
->
blocks
);
ASSERT
(
numOfBlocks
!=
0
);
...
...
@@ -450,7 +449,7 @@ int32_t doDispatchAllBlocks(SStreamTask* pTask, const SStreamDataBlock* pData) {
SStreamDispatchReq
req
=
{
0
};
int32_t
downstreamTaskId
=
pTask
->
fixedEpDispatcher
.
taskId
;
code
=
tInitStreamDispatchReq
(
&
req
,
pTask
,
pData
->
srcVgId
,
numOfBlocks
,
downstreamTaskId
,
);
code
=
tInitStreamDispatchReq
(
&
req
,
pTask
,
pData
->
srcVgId
,
numOfBlocks
,
downstreamTaskId
,
pData
->
type
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
return
code
;
}
...
...
@@ -491,7 +490,7 @@ int32_t doDispatchAllBlocks(SStreamTask* pTask, const SStreamDataBlock* pData) {
for
(
int32_t
i
=
0
;
i
<
vgSz
;
i
++
)
{
SVgroupInfo
*
pVgInfo
=
taosArrayGet
(
vgInfo
,
i
);
code
=
tInitStreamDispatchReq
(
&
pReqs
[
i
],
pTask
,
pData
->
srcVgId
,
0
,
pVgInfo
->
taskId
);
code
=
tInitStreamDispatchReq
(
&
pReqs
[
i
],
pTask
,
pData
->
srcVgId
,
0
,
pVgInfo
->
taskId
,
pData
->
type
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
goto
FAIL_SHUFFLE_DISPATCH
;
}
...
...
@@ -501,8 +500,7 @@ int32_t doDispatchAllBlocks(SStreamTask* pTask, const SStreamDataBlock* pData) {
SSDataBlock
*
pDataBlock
=
taosArrayGet
(
pData
->
blocks
,
i
);
// TODO: do not use broadcast
if
(
pDataBlock
->
info
.
type
==
STREAM_DELETE_RESULT
)
{
if
(
pDataBlock
->
info
.
type
==
STREAM_DELETE_RESULT
||
pDataBlock
->
info
.
type
==
STREAM_CHECKPOINT
||
pDataBlock
->
info
.
type
==
STREAM_TRANS_STATE
)
{
for
(
int32_t
j
=
0
;
j
<
vgSz
;
j
++
)
{
if
(
streamAddBlockIntoDispatchMsg
(
pDataBlock
,
&
pReqs
[
j
])
<
0
)
{
goto
FAIL_SHUFFLE_DISPATCH
;
...
...
@@ -522,14 +520,14 @@ int32_t doDispatchAllBlocks(SStreamTask* pTask, const SStreamDataBlock* pData) {
}
}
qDebug
(
"s-task:%s (child taskId:%d) shuffle-dispatch blocks:%d to %d vgroups"
,
pTask
->
id
.
idStr
,
pTask
->
info
.
selfChildId
,
numOfBlocks
,
vgSz
);
qDebug
(
"s-task:%s (child taskId:%d) shuffle-dispatch blocks:%d to %d vgroups"
,
pTask
->
id
.
idStr
,
pTask
->
info
.
selfChildId
,
numOfBlocks
,
vgSz
);
for
(
int32_t
i
=
0
;
i
<
vgSz
;
i
++
)
{
if
(
pReqs
[
i
].
blockNum
>
0
)
{
SVgroupInfo
*
pVgInfo
=
taosArrayGet
(
vgInfo
,
i
);
qDebug
(
"s-task:%s (child taskId:%d) shuffle-dispatch blocks:%d to vgId:%d"
,
pTask
->
id
.
idStr
,
pTask
->
info
.
selfChildId
,
pReqs
[
i
].
blockNum
,
pVgInfo
->
vgId
);
qDebug
(
"s-task:%s (child taskId:%d) shuffle-dispatch blocks:%d to vgId:%d"
,
pTask
->
id
.
idStr
,
p
Task
->
info
.
selfChildId
,
p
Reqs
[
i
].
blockNum
,
pVgInfo
->
vgId
);
code
=
doSendDispatchMsg
(
pTask
,
&
pReqs
[
i
],
pVgInfo
->
vgId
,
&
pVgInfo
->
epSet
);
if
(
code
<
0
)
{
...
...
@@ -540,7 +538,7 @@ int32_t doDispatchAllBlocks(SStreamTask* pTask, const SStreamDataBlock* pData) {
code
=
0
;
FAIL_SHUFFLE_DISPATCH:
FAIL_SHUFFLE_DISPATCH:
for
(
int32_t
i
=
0
;
i
<
vgSz
;
i
++
)
{
taosArrayDestroyP
(
pReqs
[
i
].
data
,
taosMemoryFree
);
taosArrayDestroy
(
pReqs
[
i
].
dataLen
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录