Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
c07e563e
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,发现更多精彩内容 >>
提交
c07e563e
编写于
3月 22, 2023
作者:
wmmhello
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:error in optimize consume logic
上级
f7b7320f
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
16 addition
and
21 deletion
+16
-21
source/dnode/vnode/src/tq/tqExec.c
source/dnode/vnode/src/tq/tqExec.c
+6
-9
source/dnode/vnode/src/tq/tqRead.c
source/dnode/vnode/src/tq/tqRead.c
+2
-2
source/libs/executor/src/projectoperator.c
source/libs/executor/src/projectoperator.c
+2
-6
source/libs/executor/src/scanoperator.c
source/libs/executor/src/scanoperator.c
+6
-4
未找到文件。
source/dnode/vnode/src/tq/tqExec.c
浏览文件 @
c07e563e
...
...
@@ -76,13 +76,13 @@ int32_t tqScanData(STQ* pTq, const STqHandle* pHandle, SMqDataRsp* pRsp, STqOffs
SSDataBlock
*
pDataBlock
=
NULL
;
uint64_t
ts
=
0
;
tqDebug
(
"
vgId:%d, tmq task start to execute"
,
pTq
->
pVnode
->
config
.
vgId
);
tqDebug
(
"
consumer:0x%"
PRIx64
" vgId:%d, tmq task start execute"
,
pHandle
->
consumerId
,
pTq
->
pVnode
->
config
.
vgId
);
if
(
qExecTask
(
task
,
&
pDataBlock
,
&
ts
)
<
0
)
{
tqError
(
"
vgId:%d, task exec error since %s"
,
pTq
->
pVnode
->
config
.
vgId
,
terrstr
());
tqError
(
"
consumer:0x%"
PRIx64
" vgId:%d, task exec error since %s"
,
pHandle
->
consumerId
,
pTq
->
pVnode
->
config
.
vgId
,
terrstr
());
return
-
1
;
}
tqDebug
(
"consumer:0x%"
PRIx64
" vgId:%d, tmq task e
xecuted, get
%p"
,
pHandle
->
consumerId
,
pTq
->
pVnode
->
config
.
vgId
,
pDataBlock
);
tqDebug
(
"consumer:0x%"
PRIx64
" vgId:%d, tmq task e
nd execute, get block:
%p"
,
pHandle
->
consumerId
,
pTq
->
pVnode
->
config
.
vgId
,
pDataBlock
);
// current scan should be stopped asap, since the rebalance occurs.
if
(
pDataBlock
==
NULL
)
{
...
...
@@ -91,12 +91,9 @@ int32_t tqScanData(STQ* pTq, const STqHandle* pHandle, SMqDataRsp* pRsp, STqOffs
tqAddBlockDataToRsp
(
pDataBlock
,
pRsp
,
pExec
->
numOfCols
,
pTq
->
pVnode
->
config
.
tsdbCfg
.
precision
);
pRsp
->
blockNum
++
;
if
(
pOffset
->
type
==
TMQ_OFFSET__SNAPSHOT_DATA
)
{
rowCnt
+=
pDataBlock
->
info
.
rows
;
if
(
rowCnt
>=
4096
)
{
break
;
}
rowCnt
+=
pDataBlock
->
info
.
rows
;
if
(
rowCnt
>=
4096
)
{
break
;
}
}
...
...
source/dnode/vnode/src/tq/tqRead.c
浏览文件 @
c07e563e
...
...
@@ -309,7 +309,7 @@ void tqNextBlock(STqReader* pReader, SFetchRet* ret) {
ret
->
offset
.
type
=
TMQ_OFFSET__LOG
;
ret
->
offset
.
version
=
pReader
->
pWalReader
->
curVersion
;
ret
->
fetchType
=
FETCH_TYPE__NONE
;
tqInfo
(
"
return
offset %"
PRId64
", no more valid msg in wal"
,
ret
->
offset
.
version
);
tqInfo
(
"
wal return none,
offset %"
PRId64
", no more valid msg in wal"
,
ret
->
offset
.
version
);
return
;
}
...
...
@@ -327,7 +327,7 @@ void tqNextBlock(STqReader* pReader, SFetchRet* ret) {
continue
;
}
ret
->
fetchType
=
FETCH_TYPE__DATA
;
tqDebug
(
"return data rows %d"
,
ret
->
data
.
info
.
rows
);
tqDebug
(
"
wal
return data rows %d"
,
ret
->
data
.
info
.
rows
);
return
;
}
}
...
...
source/libs/executor/src/projectoperator.c
浏览文件 @
c07e563e
...
...
@@ -256,13 +256,9 @@ SSDataBlock* doProjectOperation(SOperatorInfo* pOperator) {
if
(
pBlock
==
NULL
)
{
if
(
pTaskInfo
->
execModel
==
OPTR_EXEC_MODEL_QUEUE
&&
pFinalRes
->
info
.
rows
==
0
)
{
pOperator
->
status
=
OP_OPENED
;
if
(
pOperator
->
status
==
OP_EXEC_RECV
)
{
continue
;
}
else
{
return
NULL
;
}
return
NULL
;
}
qDebug
(
"set op close, exec %d, status %d rows %d"
,
pTaskInfo
->
execModel
,
pOperator
->
status
,
qDebug
(
"set op close, exec
mode:
%d, status %d rows %d"
,
pTaskInfo
->
execModel
,
pOperator
->
status
,
pFinalRes
->
info
.
rows
);
setOperatorCompleted
(
pOperator
);
break
;
...
...
source/libs/executor/src/scanoperator.c
浏览文件 @
c07e563e
...
...
@@ -1627,12 +1627,14 @@ static SSDataBlock* doQueueScan(SOperatorInfo* pOperator) {
if
(
ret
.
fetchType
==
FETCH_TYPE__DATA
)
{
blockDataCleanup
(
pInfo
->
pRes
);
setBlockIntoRes
(
pInfo
,
&
ret
.
data
,
true
);
qDebug
(
"queue scan log return %d rows"
,
pInfo
->
pRes
->
info
.
rows
);
return
pInfo
->
pRes
;
}
else
{
if
(
pInfo
->
pRes
->
info
.
rows
>
0
)
{
qDebug
(
"queue scan log return %d rows"
,
pInfo
->
pRes
->
info
.
rows
);
return
pInfo
->
pRes
;
}
}
else
if
(
ret
.
fetchType
==
FETCH_TYPE__NONE
){
pTaskInfo
->
streamInfo
.
currentOffset
=
ret
.
offset
;
return
NULL
;
}
return
NULL
;
}
}
else
{
qError
(
"unexpected streamInfo prepare type: %d"
,
pTaskInfo
->
streamInfo
.
currentOffset
.
type
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录