Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
b44493e4
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看板
未验证
提交
b44493e4
编写于
7月 26, 2022
作者:
L
Liu Jicong
提交者:
GitHub
7月 26, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #15405 from taosdata/fix/td-17801-fix
fix(stream): continuously sink
上级
4bc94172
23f0feca
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
20 addition
and
4 deletion
+20
-4
source/libs/executor/src/projectoperator.c
source/libs/executor/src/projectoperator.c
+16
-2
source/libs/stream/src/streamExec.c
source/libs/stream/src/streamExec.c
+4
-2
未找到文件。
source/libs/executor/src/projectoperator.c
浏览文件 @
b44493e4
...
...
@@ -68,10 +68,12 @@ SOperatorInfo* createProjectOperatorInfo(SOperatorInfo* downstream, SProjectPhys
pInfo
->
mergeDataBlocks
=
pProjPhyNode
->
mergeDataBlock
;
// todo remove it soon
if
(
pTaskInfo
->
execModel
==
OPTR_EXEC_MODEL_STREAM
)
{
pInfo
->
mergeDataBlocks
=
false
;
}
int32_t
numOfRows
=
4096
;
size_t
keyBufSize
=
sizeof
(
int64_t
)
+
sizeof
(
int64_t
)
+
POINTER_BYTES
;
...
...
@@ -181,6 +183,16 @@ static int32_t doIngroupLimitOffset(SLimitInfo* pLimitInfo, uint64_t groupId, SS
return
PROJECT_RETRIEVE_DONE
;
}
void
printDataBlock1
(
SSDataBlock
*
pBlock
,
const
char
*
flag
)
{
if
(
!
pBlock
||
pBlock
->
info
.
rows
==
0
)
{
qDebug
(
"===stream===printDataBlock: Block is Null or Empty"
);
return
;
}
char
*
pBuf
=
NULL
;
qDebug
(
"%s"
,
dumpBlockData
(
pBlock
,
flag
,
&
pBuf
));
taosMemoryFreeClear
(
pBuf
);
}
SSDataBlock
*
doProjectOperation
(
SOperatorInfo
*
pOperator
)
{
SProjectOperatorInfo
*
pProjectInfo
=
pOperator
->
info
;
SOptrBasicInfo
*
pInfo
=
&
pProjectInfo
->
binfo
;
...
...
@@ -229,6 +241,7 @@ SSDataBlock* doProjectOperation(SOperatorInfo* pOperator) {
// for stream interval
if
(
pBlock
->
info
.
type
==
STREAM_RETRIEVE
)
{
// printDataBlock1(pBlock, "project1");
return
pBlock
;
}
...
...
@@ -302,7 +315,8 @@ SSDataBlock* doProjectOperation(SOperatorInfo* pOperator) {
if
(
pOperator
->
cost
.
openCost
==
0
)
{
pOperator
->
cost
.
openCost
=
(
taosGetTimestampUs
()
-
st
)
/
1000
.
0
;
}
// printDataBlock1(p, "project");
return
(
p
->
info
.
rows
>
0
)
?
p
:
NULL
;
}
...
...
@@ -587,4 +601,4 @@ SSDataBlock* doGenerateSourceData(SOperatorInfo* pOperator) {
}
return
(
pRes
->
info
.
rows
>
0
)
?
pRes
:
NULL
;
}
\ No newline at end of file
}
source/libs/stream/src/streamExec.c
浏览文件 @
b44493e4
...
...
@@ -26,7 +26,7 @@ static int32_t streamTaskExecImpl(SStreamTask* pTask, void* data, SArray* pRes)
}
else
if
(
pItem
->
type
==
STREAM_INPUT__DATA_SUBMIT
)
{
ASSERT
(
pTask
->
isDataScan
);
SStreamDataSubmit
*
pSubmit
=
(
SStreamDataSubmit
*
)
data
;
qDebug
(
"task %d %p set submit input %p %p %d"
,
pTask
->
taskId
,
pTask
,
pSubmit
,
pSubmit
->
data
,
*
pSubmit
->
dataRef
);
qDebug
(
"task %d %p set submit input %p %p %d
1
"
,
pTask
->
taskId
,
pTask
,
pSubmit
,
pSubmit
->
data
,
*
pSubmit
->
dataRef
);
qSetStreamInput
(
exec
,
pSubmit
->
data
,
STREAM_INPUT__DATA_SUBMIT
,
false
);
}
else
if
(
pItem
->
type
==
STREAM_INPUT__DATA_BLOCK
||
pItem
->
type
==
STREAM_INPUT__DATA_RETRIEVE
)
{
SStreamDataBlock
*
pBlock
=
(
SStreamDataBlock
*
)
data
;
...
...
@@ -72,6 +72,8 @@ static int32_t streamTaskExecImpl(SStreamTask* pTask, void* data, SArray* pRes)
continue
;
}
qDebug
(
"task %d(child %d) executed and get block"
);
SSDataBlock
block
=
{
0
};
assignOneDataBlock
(
&
block
,
output
);
block
.
info
.
childId
=
pTask
->
selfChildId
;
...
...
@@ -188,7 +190,7 @@ static SArray* streamExecForQall(SStreamTask* pTask, SArray* pRes) {
if
(
pTask
->
execType
==
TASK_EXEC__NONE
)
{
ASSERT
(((
SStreamQueueItem
*
)
data
)
->
type
==
STREAM_INPUT__DATA_BLOCK
);
streamTaskOutput
(
pTask
,
data
);
return
pRes
;
continue
;
}
qDebug
(
"stream task %d exec begin, msg batch: %d"
,
pTask
->
taskId
,
cnt
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录