Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
edaec52b
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
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,发现更多精彩内容 >>
提交
edaec52b
编写于
7月 19, 2022
作者:
L
Liu Jicong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: add debug flag
上级
414673db
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
18 addition
and
12 deletion
+18
-12
source/libs/executor/src/executor.c
source/libs/executor/src/executor.c
+15
-10
source/libs/stream/src/streamExec.c
source/libs/stream/src/streamExec.c
+3
-2
未找到文件。
source/libs/executor/src/executor.c
浏览文件 @
edaec52b
...
@@ -42,23 +42,27 @@ static int32_t doSetStreamBlock(SOperatorInfo* pOperator, void* input, size_t nu
...
@@ -42,23 +42,27 @@ static int32_t doSetStreamBlock(SOperatorInfo* pOperator, void* input, size_t nu
// TODO: if a block was set but not consumed,
// TODO: if a block was set but not consumed,
// prevent setting a different type of block
// prevent setting a different type of block
pInfo
->
blockType
=
type
;
pInfo
->
validBlockIndex
=
0
;
pInfo
->
validBlockIndex
=
0
;
taosArrayClear
(
pInfo
->
pBlockLists
);
taosArrayClear
(
pInfo
->
pBlockLists
);
if
(
type
==
STREAM_INPUT__DATA_SUBMIT
)
{
if
(
type
==
STREAM_INPUT__MERGED_SUBMIT
)
{
ASSERT
(
numOfBlocks
>
1
);
for
(
int32_t
i
=
0
;
i
<
numOfBlocks
;
i
++
)
{
SSubmitReq
*
pReq
=
*
(
void
**
)
POINTER_SHIFT
(
input
,
i
*
sizeof
(
void
*
));
taosArrayPush
(
pInfo
->
pBlockLists
,
&
pReq
);
}
pInfo
->
blockType
=
STREAM_INPUT__DATA_SUBMIT
;
}
else
if
(
type
==
STREAM_INPUT__DATA_SUBMIT
)
{
/*if (tqReaderSetDataMsg(pInfo->tqReader, input, 0) < 0) {*/
/*if (tqReaderSetDataMsg(pInfo->tqReader, input, 0) < 0) {*/
/*qError("submit msg messed up when initing stream block, %s" PRIx64, id);*/
/*qError("submit msg messed up when initing stream block, %s" PRIx64, id);*/
/*return TSDB_CODE_QRY_APP_ERROR;*/
/*return TSDB_CODE_QRY_APP_ERROR;*/
/*}*/
/*}*/
if
(
numOfBlocks
==
1
)
{
ASSERT
(
numOfBlocks
==
1
);
taosArrayPush
(
pInfo
->
pBlockLists
,
&
input
);
/*if (numOfBlocks == 1) {*/
}
else
{
taosArrayPush
(
pInfo
->
pBlockLists
,
&
input
);
for
(
int32_t
i
=
0
;
i
<
numOfBlocks
;
i
++
)
{
pInfo
->
blockType
=
STREAM_INPUT__DATA_SUBMIT
;
SSubmitReq
*
pReq
=
*
(
void
**
)
POINTER_SHIFT
(
input
,
i
*
sizeof
(
void
*
));
/*} else {*/
taosArrayPush
(
pInfo
->
pBlockLists
,
&
pReq
);
/*}*/
}
}
}
else
if
(
type
==
STREAM_INPUT__DATA_BLOCK
)
{
}
else
if
(
type
==
STREAM_INPUT__DATA_BLOCK
)
{
for
(
int32_t
i
=
0
;
i
<
numOfBlocks
;
++
i
)
{
for
(
int32_t
i
=
0
;
i
<
numOfBlocks
;
++
i
)
{
SSDataBlock
*
pDataBlock
=
&
((
SSDataBlock
*
)
input
)[
i
];
SSDataBlock
*
pDataBlock
=
&
((
SSDataBlock
*
)
input
)[
i
];
...
@@ -71,6 +75,7 @@ static int32_t doSetStreamBlock(SOperatorInfo* pOperator, void* input, size_t nu
...
@@ -71,6 +75,7 @@ static int32_t doSetStreamBlock(SOperatorInfo* pOperator, void* input, size_t nu
taosArrayAddAll
(
p
->
pDataBlock
,
pDataBlock
->
pDataBlock
);
taosArrayAddAll
(
p
->
pDataBlock
,
pDataBlock
->
pDataBlock
);
taosArrayPush
(
pInfo
->
pBlockLists
,
&
p
);
taosArrayPush
(
pInfo
->
pBlockLists
,
&
p
);
}
}
pInfo
->
blockType
=
STREAM_INPUT__DATA_BLOCK
;
}
else
{
}
else
{
ASSERT
(
0
);
ASSERT
(
0
);
}
}
...
...
source/libs/stream/src/streamExec.c
浏览文件 @
edaec52b
...
@@ -36,7 +36,8 @@ static int32_t streamTaskExecImpl(SStreamTask* pTask, void* data, SArray* pRes)
...
@@ -36,7 +36,8 @@ static int32_t streamTaskExecImpl(SStreamTask* pTask, void* data, SArray* pRes)
}
else
if
(
pItem
->
type
==
STREAM_INPUT__MERGED_SUBMIT
)
{
}
else
if
(
pItem
->
type
==
STREAM_INPUT__MERGED_SUBMIT
)
{
SStreamMergedSubmit
*
pMerged
=
(
SStreamMergedSubmit
*
)
data
;
SStreamMergedSubmit
*
pMerged
=
(
SStreamMergedSubmit
*
)
data
;
SArray
*
blocks
=
pMerged
->
reqs
;
SArray
*
blocks
=
pMerged
->
reqs
;
qSetMultiStreamInput
(
exec
,
blocks
->
pData
,
blocks
->
size
,
STREAM_INPUT__DATA_SUBMIT
,
false
);
qDebug
(
"task %d %p set submit input (merged), batch num: %d"
,
pTask
->
taskId
,
pTask
,
(
int32_t
)
blocks
->
size
);
qSetMultiStreamInput
(
exec
,
blocks
->
pData
,
blocks
->
size
,
STREAM_INPUT__MERGED_SUBMIT
,
false
);
}
else
{
}
else
{
ASSERT
(
0
);
ASSERT
(
0
);
}
}
...
@@ -147,7 +148,7 @@ int32_t streamPipelineExec(SStreamTask* pTask, int32_t batchNum) {
...
@@ -147,7 +148,7 @@ int32_t streamPipelineExec(SStreamTask* pTask, int32_t batchNum) {
static
SArray
*
streamExecForQall
(
SStreamTask
*
pTask
,
SArray
*
pRes
)
{
static
SArray
*
streamExecForQall
(
SStreamTask
*
pTask
,
SArray
*
pRes
)
{
while
(
1
)
{
while
(
1
)
{
int32_t
cnt
=
0
;
int32_t
cnt
=
1
;
void
*
data
=
NULL
;
void
*
data
=
NULL
;
while
(
1
)
{
while
(
1
)
{
SStreamQueueItem
*
qItem
=
streamQueueNextItem
(
pTask
->
inputQueue
);
SStreamQueueItem
*
qItem
=
streamQueueNextItem
(
pTask
->
inputQueue
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录