Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
0e1328ae
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看板
提交
0e1328ae
编写于
6月 10, 2022
作者:
L
Liu Jicong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(stream): set child id
上级
7ab3a1e4
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
23 addition
and
14 deletion
+23
-14
include/common/tmsg.h
include/common/tmsg.h
+11
-11
source/dnode/mnode/impl/src/mndScheduler.c
source/dnode/mnode/impl/src/mndScheduler.c
+10
-3
source/libs/stream/src/streamData.c
source/libs/stream/src/streamData.c
+1
-0
source/libs/stream/src/streamDispatch.c
source/libs/stream/src/streamDispatch.c
+1
-0
未找到文件。
include/common/tmsg.h
浏览文件 @
0e1328ae
...
...
@@ -1205,6 +1205,7 @@ typedef struct {
int8_t
completed
;
// all results are returned to client
int8_t
precision
;
int8_t
compressed
;
int8_t
streamBlockType
;
int32_t
compLen
;
int32_t
numOfRows
;
int32_t
numOfCols
;
...
...
@@ -2493,14 +2494,14 @@ int32_t tSerializeSTableIndexReq(void* buf, int32_t bufLen, STableIndexReq* pReq
int32_t
tDeserializeSTableIndexReq
(
void
*
buf
,
int32_t
bufLen
,
STableIndexReq
*
pReq
);
typedef
struct
{
int8_t
intervalUnit
;
int8_t
slidingUnit
;
int64_t
interval
;
int64_t
offset
;
int64_t
sliding
;
int64_t
dstTbUid
;
int32_t
dstVgId
;
// for stream
char
*
expr
;
int8_t
intervalUnit
;
int8_t
slidingUnit
;
int64_t
interval
;
int64_t
offset
;
int64_t
sliding
;
int64_t
dstTbUid
;
int32_t
dstVgId
;
// for stream
char
*
expr
;
}
STableIndexInfo
;
typedef
struct
{
...
...
@@ -2510,7 +2511,6 @@ typedef struct {
int32_t
tSerializeSTableIndexRsp
(
void
*
buf
,
int32_t
bufLen
,
const
STableIndexRsp
*
pRsp
);
int32_t
tDeserializeSTableIndexRsp
(
void
*
buf
,
int32_t
bufLen
,
STableIndexRsp
*
pRsp
);
typedef
struct
{
int8_t
mqMsgType
;
int32_t
code
;
...
...
@@ -2751,8 +2751,8 @@ typedef struct {
char
*
msg
;
}
SVDeleteReq
;
int32_t
tSerializeSVDeleteReq
(
void
*
buf
,
int32_t
bufLen
,
SVDeleteReq
*
pReq
);
int32_t
tDeserializeSVDeleteReq
(
void
*
buf
,
int32_t
bufLen
,
SVDeleteReq
*
pReq
);
int32_t
tSerializeSVDeleteReq
(
void
*
buf
,
int32_t
bufLen
,
SVDeleteReq
*
pReq
);
int32_t
tDeserializeSVDeleteReq
(
void
*
buf
,
int32_t
bufLen
,
SVDeleteReq
*
pReq
);
typedef
struct
{
int64_t
affectedRows
;
...
...
source/dnode/mnode/impl/src/mndScheduler.c
浏览文件 @
0e1328ae
...
...
@@ -35,6 +35,13 @@
extern
bool
tsStreamSchedV
;
static
int32_t
mndAddTaskToTaskSet
(
SArray
*
pArray
,
SStreamTask
*
pTask
)
{
int32_t
childId
=
taosArrayGetSize
(
pArray
);
pTask
->
childId
=
childId
;
taosArrayPush
(
pArray
,
&
pTask
);
return
0
;
}
int32_t
mndConvertRSmaTask
(
const
char
*
ast
,
int64_t
uid
,
int8_t
triggerType
,
int64_t
watermark
,
char
**
pStr
,
int32_t
*
pLen
,
double
filesFactor
)
{
SNode
*
pAst
=
NULL
;
...
...
@@ -195,7 +202,7 @@ int32_t mndAddShuffledSinkToStream(SMnode* pMnode, STrans* pTrans, SStreamObj* p
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
return
-
1
;
}
taosArrayPush
(
tasks
,
&
pTask
);
mndAddTaskToTaskSet
(
tasks
,
pTask
);
pTask
->
nodeId
=
pVgroup
->
vgId
;
pTask
->
epSet
=
mndGetVgroupEpset
(
pMnode
,
pVgroup
);
...
...
@@ -235,7 +242,7 @@ int32_t mndAddFixedSinkToStream(SMnode* pMnode, STrans* pTrans, SStreamObj* pStr
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
return
-
1
;
}
taosArrayPush
(
tasks
,
&
pTask
);
mndAddTaskToTaskSet
(
tasks
,
pTask
);
pTask
->
nodeId
=
pStream
->
fixedSinkVgId
;
#if 0
...
...
@@ -378,7 +385,7 @@ int32_t mndScheduleStream(SMnode* pMnode, STrans* pTrans, SStreamObj* pStream) {
return
-
1
;
}
sdbRelease
(
pSdb
,
pVgroup
);
taosArrayPush
(
taskOneLevel
,
&
pTask
);
mndAddTaskToTaskSet
(
taskOneLevel
,
pTask
);
}
}
else
{
// merge plan
...
...
source/libs/stream/src/streamData.c
浏览文件 @
0e1328ae
...
...
@@ -53,6 +53,7 @@ int32_t streamDispatchReqToData(const SStreamDispatchReq* pReq, SStreamDataBlock
SSDataBlock
*
pDataBlock
=
taosArrayGet
(
pArray
,
i
);
blockCompressDecode
(
pDataBlock
,
htonl
(
pRetrieve
->
numOfCols
),
htonl
(
pRetrieve
->
numOfRows
),
pRetrieve
->
data
);
// TODO: refactor
pDataBlock
->
info
.
type
=
pRetrieve
->
streamBlockType
;
pDataBlock
->
info
.
childId
=
pReq
->
sourceChildId
;
}
pData
->
blocks
=
pArray
;
...
...
source/libs/stream/src/streamDispatch.c
浏览文件 @
0e1328ae
...
...
@@ -72,6 +72,7 @@ static int32_t streamAddBlockToDispatchMsg(const SSDataBlock* pBlock, SStreamDis
pRetrieve
->
precision
=
TSDB_DEFAULT_PRECISION
;
pRetrieve
->
compressed
=
0
;
pRetrieve
->
completed
=
1
;
pRetrieve
->
streamBlockType
=
pBlock
->
info
.
type
;
pRetrieve
->
numOfRows
=
htonl
(
pBlock
->
info
.
rows
);
pRetrieve
->
numOfCols
=
htonl
(
pBlock
->
info
.
numOfCols
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录