Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
4c4be3c5
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,发现更多精彩内容 >>
提交
4c4be3c5
编写于
1月 21, 2022
作者:
L
Liu Jicong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
put createStreamExecTaskInfo into right place
上级
7361019e
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
18 addition
and
35 deletion
+18
-35
include/libs/executor/executor.h
include/libs/executor/executor.h
+3
-1
source/dnode/vnode/inc/tq.h
source/dnode/vnode/inc/tq.h
+0
-15
source/dnode/vnode/src/tq/tq.c
source/dnode/vnode/src/tq/tq.c
+9
-15
source/libs/executor/src/executor.c
source/libs/executor/src/executor.c
+6
-4
未找到文件。
include/libs/executor/executor.h
浏览文件 @
4c4be3c5
...
...
@@ -32,7 +32,9 @@ struct SSubplan;
* @param pStreamBlockReadHandle
* @return
*/
qTaskInfo_t
createStreamExecTaskInfo
(
SSubQueryMsg
*
pMsg
,
void
*
pStreamBlockReadHandle
);
qTaskInfo_t
qCreateStreamExecTaskInfo
(
SSubQueryMsg
*
pMsg
,
void
*
pStreamBlockReadHandle
);
void
qStreamExecTaskSetInput
(
qTaskInfo_t
qHandle
,
void
*
input
);
/**
* Create the exec task object according to task json
...
...
source/dnode/vnode/inc/tq.h
浏览文件 @
4c4be3c5
...
...
@@ -82,27 +82,12 @@ typedef struct STqSubscribeReq {
int64_t
topic
[];
}
STqSubscribeReq
;
typedef
struct
STqSubscribeRsp
{
STqMsgHead
head
;
int64_t
vgId
;
char
ep
[
TSDB_EP_LEN
];
// TSDB_EP_LEN
}
STqSubscribeRsp
;
typedef
struct
STqHeartbeatReq
{
}
STqHeartbeatReq
;
typedef
struct
STqHeartbeatRsp
{
}
STqHeartbeatRsp
;
typedef
struct
STqTopicVhandle
{
int64_t
topicId
;
// executor for filter
void
*
filterExec
;
// callback for mnode
// trigger when vnode list associated topic change
void
*
(
*
mCallback
)(
void
*
,
void
*
);
}
STqTopicVhandle
;
#define TQ_BUFFER_SIZE 8
typedef
struct
STqExec
{
...
...
source/dnode/vnode/src/tq/tq.c
浏览文件 @
4c4be3c5
...
...
@@ -633,12 +633,16 @@ int32_t tqProcessConsumeReq(STQ* pTq, SRpcMsg* pMsg, SRpcMsg** ppRsp) {
// read until find TDMT_VND_SUBMIT
}
SSubmitMsg
*
pCont
=
(
SSubmitMsg
*
)
&
pHead
->
head
.
body
;
void
*
task
=
pHandle
->
buffer
.
output
[
pos
].
task
;
/*SSubQueryMsg* pQueryMsg = pHandle->buffer.output[pos].pMsg;*/
qStreamExecTaskSetInput
(
task
,
pCont
);
SSDataBlock
*
pDataBlock
;
uint64_t
ts
;
if
(
qExecTask
(
task
,
&
pDataBlock
,
&
ts
)
<
0
)
{
}
// TODO: launch query and get output data
void
*
outputData
;
pHandle
->
buffer
.
output
[
pos
].
dst
=
outputData
;
pHandle
->
buffer
.
output
[
pos
].
dst
=
pDataBlock
;
if
(
pHandle
->
buffer
.
firstOffset
==
-
1
||
pReq
->
offset
<
pHandle
->
buffer
.
firstOffset
)
{
pHandle
->
buffer
.
firstOffset
=
pReq
->
offset
;
...
...
@@ -674,22 +678,12 @@ int32_t tqProcessSetConnReq(STQ* pTq, SMqSetCVgReq* pReq) {
strcpy
(
pTopic
->
sql
,
pReq
->
sql
);
strcpy
(
pTopic
->
logicalPlan
,
pReq
->
logicalPlan
);
strcpy
(
pTopic
->
physicalPlan
,
pReq
->
physicalPlan
);
SArray
*
pArray
;
//TODO: deserialize to SQueryDag
SQueryDag
*
pDag
;
// convert to task
if
(
schedulerConvertDagToTaskList
(
pDag
,
&
pArray
)
<
0
)
{
// TODO: handle error
}
STaskInfo
*
pInfo
=
taosArrayGet
(
pArray
,
0
);
SArray
*
pTasks
;
schedulerCopyTask
(
pInfo
,
&
pTasks
,
TQ_BUFFER_SIZE
);
pTopic
->
buffer
.
firstOffset
=
-
1
;
pTopic
->
buffer
.
lastOffset
=
-
1
;
for
(
int
i
=
0
;
i
<
TQ_BUFFER_SIZE
;
i
++
)
{
SSubQueryMsg
*
pMsg
=
taosArrayGet
(
pTasks
,
i
);
pTopic
->
buffer
.
output
[
i
].
status
=
0
;
pTopic
->
buffer
.
output
[
i
].
task
=
createStreamExecTaskInfo
(
pM
sg
,
NULL
);
pTopic
->
buffer
.
output
[
i
].
task
=
qCreateStreamExecTaskInfo
(
&
pReq
->
m
sg
,
NULL
);
}
pTopic
->
pReadhandle
=
walOpenReadHandle
(
pTq
->
pWal
);
// write mq meta
...
...
source/libs/executor/src/executor.c
浏览文件 @
4c4be3c5
...
...
@@ -13,10 +13,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "planner.h"
#include "executor.h"
#include "planner.h"
void
qStreamExecTaskSetInput
(
qTaskInfo_t
qHandle
,
void
*
input
)
{}
qTaskInfo_t
createStreamExecTaskInfo
(
SSubQueryMsg
*
pMsg
,
void
*
pStreamBlockReadHandle
)
{
qTaskInfo_t
qCreateStreamExecTaskInfo
(
SSubQueryMsg
*
pMsg
,
void
*
pStreamBlockReadHandle
)
{
if
(
pMsg
==
NULL
||
pStreamBlockReadHandle
==
NULL
)
{
return
NULL
;
}
...
...
@@ -27,7 +29,7 @@ qTaskInfo_t createStreamExecTaskInfo(SSubQueryMsg *pMsg, void* pStreamBlockReadH
pMsg
->
taskId
=
be64toh
(
pMsg
->
taskId
);
pMsg
->
contentLen
=
ntohl
(
pMsg
->
contentLen
);
struct
SSubplan
*
plan
=
NULL
;
struct
SSubplan
*
plan
=
NULL
;
int32_t
code
=
qStringToSubplan
(
pMsg
->
msg
,
&
plan
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
terrno
=
code
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录