Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
59b0f99f
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看板
未验证
提交
59b0f99f
编写于
7月 19, 2022
作者:
L
liuyao
提交者:
GitHub
7月 19, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #15110 from taosdata/feature/TD-17357
feat(stream): add num of children
上级
8f7ecfd3
8e41fc91
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
17 addition
and
4 deletion
+17
-4
include/libs/executor/executor.h
include/libs/executor/executor.h
+1
-0
include/libs/stream/tstream.h
include/libs/stream/tstream.h
+1
-0
source/dnode/mnode/impl/src/mndScheduler.c
source/dnode/mnode/impl/src/mndScheduler.c
+5
-0
source/dnode/vnode/src/tq/tq.c
source/dnode/vnode/src/tq/tq.c
+5
-1
source/libs/executor/src/executorimpl.c
source/libs/executor/src/executorimpl.c
+2
-2
source/libs/executor/src/scanoperator.c
source/libs/executor/src/scanoperator.c
+1
-1
source/libs/stream/src/streamTask.c
source/libs/stream/src/streamTask.c
+2
-0
未找到文件。
include/libs/executor/executor.h
浏览文件 @
59b0f99f
...
...
@@ -40,6 +40,7 @@ typedef struct SReadHandle {
bool
initMetaReader
;
bool
initTableReader
;
bool
initTqReader
;
int32_t
numOfVgroups
;
}
SReadHandle
;
// in queue mode, data streams are seperated by msg
...
...
include/libs/stream/tstream.h
浏览文件 @
59b0f99f
...
...
@@ -262,6 +262,7 @@ typedef struct SStreamTask {
int64_t
startVer
;
int64_t
checkpointVer
;
int64_t
processedVer
;
int32_t
numOfVgroups
;
// children info
SArray
*
childEpInfo
;
// SArray<SStreamChildEpInfo*>
...
...
source/dnode/mnode/impl/src/mndScheduler.c
浏览文件 @
59b0f99f
...
...
@@ -383,6 +383,11 @@ int32_t mndScheduleStream(SMnode* pMnode, SStreamObj* pStream) {
// exec
pInnerTask
->
execType
=
TASK_EXEC__PIPE
;
SDbObj
*
pSourceDb
=
mndAcquireDb
(
pMnode
,
pStream
->
sourceDb
);
ASSERT
(
pDbObj
!=
NULL
);
sdbRelease
(
pSdb
,
pSourceDb
);
pInnerTask
->
numOfVgroups
=
pSourceDb
->
cfg
.
numOfVgroups
;
if
(
tsSchedStreamToSnode
)
{
SSnodeObj
*
pSnode
=
mndSchedFetchOneSnode
(
pMnode
);
if
(
pSnode
==
NULL
)
{
...
...
source/dnode/vnode/src/tq/tq.c
浏览文件 @
59b0f99f
...
...
@@ -591,7 +591,11 @@ int32_t tqProcessTaskDeployReq(STQ* pTq, char* msg, int32_t msgLen) {
};
pTask
->
exec
.
executor
=
qCreateStreamExecTaskInfo
(
pTask
->
exec
.
qmsg
,
&
handle
);
}
else
{
pTask
->
exec
.
executor
=
qCreateStreamExecTaskInfo
(
pTask
->
exec
.
qmsg
,
NULL
);
SReadHandle
mgHandle
=
{
.
vnode
=
NULL
,
.
numOfVgroups
=
pTask
->
numOfVgroups
,
};
pTask
->
exec
.
executor
=
qCreateStreamExecTaskInfo
(
pTask
->
exec
.
qmsg
,
&
mgHandle
);
}
ASSERT
(
pTask
->
exec
.
executor
);
}
...
...
source/libs/executor/src/executorimpl.c
浏览文件 @
59b0f99f
...
...
@@ -4424,7 +4424,7 @@ SOperatorInfo* createOperatorTree(SPhysiNode* pPhyNode, SExecTaskInfo* pTaskInfo
.
calTrigger
=
pTableScanNode
->
triggerType
,
.
maxTs
=
INT64_MIN
,
};
if
(
pHandle
)
{
if
(
pHandle
->
vnode
)
{
int32_t
code
=
createScanTableListInfo
(
&
pTableScanNode
->
scan
,
pTableScanNode
->
pGroupTags
,
pTableScanNode
->
groupSort
,
pHandle
,
pTableListInfo
,
pTagCond
,
pTagIndexCond
,
GET_TASKID
(
pTaskInfo
));
if
(
code
)
{
...
...
@@ -4590,7 +4590,7 @@ SOperatorInfo* createOperatorTree(SPhysiNode* pPhyNode, SExecTaskInfo* pTaskInfo
int32_t
children
=
0
;
pOptr
=
createStreamFinalIntervalOperatorInfo
(
ops
[
0
],
pPhyNode
,
pTaskInfo
,
children
);
}
else
if
(
QUERY_NODE_PHYSICAL_PLAN_STREAM_FINAL_INTERVAL
==
type
)
{
int32_t
children
=
1
;
int32_t
children
=
pHandle
->
numOfVgroups
;
pOptr
=
createStreamFinalIntervalOperatorInfo
(
ops
[
0
],
pPhyNode
,
pTaskInfo
,
children
);
}
else
if
(
QUERY_NODE_PHYSICAL_PLAN_SORT
==
type
)
{
pOptr
=
createSortOperatorInfo
(
ops
[
0
],
(
SSortPhysiNode
*
)
pPhyNode
,
pTaskInfo
);
...
...
source/libs/executor/src/scanoperator.c
浏览文件 @
59b0f99f
...
...
@@ -1539,7 +1539,7 @@ SOperatorInfo* createStreamScanOperatorInfo(SReadHandle* pHandle, STableScanPhys
goto
_error
;
}
if
(
pHandle
)
{
if
(
pHandle
->
vnode
)
{
SOperatorInfo
*
pTableScanOp
=
createTableScanOperatorInfo
(
pTableScanNode
,
pHandle
,
pTaskInfo
);
STableScanInfo
*
pTSInfo
=
(
STableScanInfo
*
)
pTableScanOp
->
info
;
if
(
pHandle
->
version
>
0
)
{
...
...
source/libs/stream/src/streamTask.c
浏览文件 @
59b0f99f
...
...
@@ -64,6 +64,7 @@ int32_t tEncodeSStreamTask(SEncoder* pEncoder, const SStreamTask* pTask) {
if
(
tEncodeI32
(
pEncoder
,
pTask
->
selfChildId
)
<
0
)
return
-
1
;
if
(
tEncodeI32
(
pEncoder
,
pTask
->
nodeId
)
<
0
)
return
-
1
;
if
(
tEncodeSEpSet
(
pEncoder
,
&
pTask
->
epSet
)
<
0
)
return
-
1
;
if
(
tEncodeI32
(
pEncoder
,
pTask
->
numOfVgroups
)
<
0
)
return
-
1
;
int32_t
epSz
=
taosArrayGetSize
(
pTask
->
childEpInfo
);
if
(
tEncodeI32
(
pEncoder
,
epSz
)
<
0
)
return
-
1
;
...
...
@@ -118,6 +119,7 @@ int32_t tDecodeSStreamTask(SDecoder* pDecoder, SStreamTask* pTask) {
if
(
tDecodeI32
(
pDecoder
,
&
pTask
->
selfChildId
)
<
0
)
return
-
1
;
if
(
tDecodeI32
(
pDecoder
,
&
pTask
->
nodeId
)
<
0
)
return
-
1
;
if
(
tDecodeSEpSet
(
pDecoder
,
&
pTask
->
epSet
)
<
0
)
return
-
1
;
if
(
tDecodeI32
(
pDecoder
,
&
pTask
->
numOfVgroups
)
<
0
)
return
-
1
;
int32_t
epSz
;
if
(
tDecodeI32
(
pDecoder
,
&
epSz
)
<
0
)
return
-
1
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录