Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
d651ba02
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22017
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看板
提交
d651ba02
编写于
4月 03, 2023
作者:
wmmhello
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:lose consume data because of exec close if consume while insert data
上级
1114d358
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
12 addition
and
19 deletion
+12
-19
include/libs/executor/executor.h
include/libs/executor/executor.h
+2
-0
source/dnode/vnode/src/tq/tqPush.c
source/dnode/vnode/src/tq/tqPush.c
+1
-1
source/dnode/vnode/src/tq/tqScan.c
source/dnode/vnode/src/tq/tqScan.c
+1
-1
source/libs/executor/inc/executorimpl.h
source/libs/executor/inc/executorimpl.h
+1
-1
source/libs/executor/src/executor.c
source/libs/executor/src/executor.c
+6
-2
source/libs/executor/src/projectoperator.c
source/libs/executor/src/projectoperator.c
+1
-14
未找到文件。
include/libs/executor/executor.h
浏览文件 @
d651ba02
...
...
@@ -198,6 +198,8 @@ int32_t qStreamPrepareScan(qTaskInfo_t tinfo, STqOffsetVal* pOffset, int8_t subT
//
int32_t
qStreamSetScanMemData
(
qTaskInfo_t
tinfo
,
SPackedData
submit
);
void
qStreamSetOpen
(
qTaskInfo_t
tinfo
);
void
qStreamExtractOffset
(
qTaskInfo_t
tinfo
,
STqOffsetVal
*
pOffset
);
SMqMetaRsp
*
qStreamExtractMetaMsg
(
qTaskInfo_t
tinfo
);
...
...
source/dnode/vnode/src/tq/tqPush.c
浏览文件 @
d651ba02
...
...
@@ -253,7 +253,7 @@ static void doPushDataForEntry(void* pIter, STqExecHandle* pExec, STQ* pTq, int6
if
(
qStreamSetScanMemData
(
pTaskInfo
,
submit
)
!=
0
)
{
return
;
}
qStreamSetOpen
(
pTaskInfo
);
// here start to scan submit block to extract the subscribed data
int32_t
totalRows
=
0
;
...
...
source/dnode/vnode/src/tq/tqScan.c
浏览文件 @
d651ba02
...
...
@@ -81,7 +81,7 @@ int32_t tqScanData(STQ* pTq, const STqHandle* pHandle, SMqDataRsp* pRsp, STqOffs
while
(
1
)
{
SSDataBlock
*
pDataBlock
=
NULL
;
uint64_t
ts
=
0
;
qStreamSetOpen
(
task
);
tqDebug
(
"consumer:0x%"
PRIx64
" vgId:%d, tmq one task start execute"
,
pHandle
->
consumerId
,
vgId
);
if
(
qExecTask
(
task
,
&
pDataBlock
,
&
ts
)
!=
TSDB_CODE_SUCCESS
)
{
tqError
(
"consumer:0x%"
PRIx64
" vgId:%d, task exec error since %s"
,
pHandle
->
consumerId
,
vgId
,
terrstr
());
...
...
source/libs/executor/inc/executorimpl.h
浏览文件 @
d651ba02
...
...
@@ -192,7 +192,7 @@ enum {
OP_OPENED
=
0x1
,
OP_RES_TO_RETURN
=
0x5
,
OP_EXEC_DONE
=
0x9
,
OP_EXEC_RECV
=
0x11
,
//
OP_EXEC_RECV = 0x11,
};
typedef
struct
SOperatorFpSet
{
...
...
source/libs/executor/src/executor.c
浏览文件 @
d651ba02
...
...
@@ -1074,6 +1074,12 @@ int32_t qStreamSetScanMemData(qTaskInfo_t tinfo, SPackedData submit) {
return
0
;
}
void
qStreamSetOpen
(
qTaskInfo_t
tinfo
)
{
SExecTaskInfo
*
pTaskInfo
=
(
SExecTaskInfo
*
)
tinfo
;
SOperatorInfo
*
pOperator
=
pTaskInfo
->
pRoot
;
pOperator
->
status
=
OP_NOT_OPENED
;
}
int32_t
qStreamPrepareScan
(
qTaskInfo_t
tinfo
,
STqOffsetVal
*
pOffset
,
int8_t
subType
)
{
SExecTaskInfo
*
pTaskInfo
=
(
SExecTaskInfo
*
)
tinfo
;
SOperatorInfo
*
pOperator
=
pTaskInfo
->
pRoot
;
...
...
@@ -1086,8 +1092,6 @@ int32_t qStreamPrepareScan(qTaskInfo_t tinfo, STqOffsetVal* pOffset, int8_t subT
}
if
(
subType
==
TOPIC_SUB_TYPE__COLUMN
)
{
pOperator
->
status
=
OP_OPENED
;
if
(
pOperator
->
operatorType
!=
QUERY_NODE_PHYSICAL_PLAN_STREAM_SCAN
)
{
if
(
pOperator
->
numOfDownstream
!=
1
)
{
qError
(
"invalid operator, number of downstream:%d, %s"
,
pOperator
->
numOfDownstream
,
id
);
...
...
source/libs/executor/src/projectoperator.c
浏览文件 @
d651ba02
...
...
@@ -227,17 +227,8 @@ SSDataBlock* doProjectOperation(SOperatorInfo* pOperator) {
blockDataCleanup
(
pFinalRes
);
SExecTaskInfo
*
pTaskInfo
=
pOperator
->
pTaskInfo
;
if
(
pTaskInfo
->
streamInfo
.
submit
.
msgStr
)
{
pOperator
->
status
=
OP_OPENED
;
}
if
(
pOperator
->
status
==
OP_EXEC_DONE
)
{
// if (pTaskInfo->execModel == OPTR_EXEC_MODEL_QUEUE) {
// pOperator->status = OP_OPENED;
// qDebug("projection in queue model, set status open and return null");
// return NULL;
// }
return
NULL
;
}
...
...
@@ -262,11 +253,7 @@ SSDataBlock* doProjectOperation(SOperatorInfo* pOperator) {
// The downstream exec may change the value of the newgroup, so use a local variable instead.
SSDataBlock
*
pBlock
=
downstream
->
fpSet
.
getNextFn
(
downstream
);
if
(
pBlock
==
NULL
&&
pTaskInfo
->
execModel
!=
OPTR_EXEC_MODEL_QUEUE
)
{
// if (pTaskInfo->execModel == OPTR_EXEC_MODEL_QUEUE && pFinalRes->info.rows == 0) {
// pOperator->status = OP_OPENED;
// return NULL;
// }
if
(
pBlock
==
NULL
)
{
qDebug
(
"set op close, exec %d, status %d rows %"
PRId64
,
pTaskInfo
->
execModel
,
pOperator
->
status
,
pFinalRes
->
info
.
rows
);
setOperatorCompleted
(
pOperator
);
break
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录