Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
92d1dbd9
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看板
提交
92d1dbd9
编写于
7月 29, 2023
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(stream): set the time window filter before generating create table result.
上级
6c9fa4d7
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
15 addition
and
14 deletion
+15
-14
source/libs/executor/src/scanoperator.c
source/libs/executor/src/scanoperator.c
+14
-14
source/libs/stream/src/streamRecover.c
source/libs/stream/src/streamRecover.c
+1
-0
未找到文件。
source/libs/executor/src/scanoperator.c
浏览文件 @
92d1dbd9
...
...
@@ -2120,8 +2120,7 @@ FETCH_NEXT_BLOCK:
return
pInfo
->
pUpdateRes
;
}
SSDataBlock
*
pBlock
=
pInfo
->
pRes
;
SDataBlockInfo
*
pBlockInfo
=
&
pBlock
->
info
;
SDataBlockInfo
*
pBlockInfo
=
&
pInfo
->
pRes
->
info
;
int32_t
totalBlocks
=
taosArrayGetSize
(
pInfo
->
pBlockLists
);
NEXT_SUBMIT_BLK:
...
...
@@ -2145,35 +2144,36 @@ FETCH_NEXT_BLOCK:
}
}
blockDataCleanup
(
p
Block
);
blockDataCleanup
(
p
Info
->
pRes
);
while
(
pAPI
->
tqReaderFn
.
tqNextBlockImpl
(
pInfo
->
tqReader
,
id
))
{
SSDataBlock
*
pRes
=
NULL
;
int32_t
code
=
pAPI
->
tqReaderFn
.
tqRetrieveBlock
(
pInfo
->
tqReader
,
&
pRes
,
id
);
qDebug
(
"retrieve data from submit completed code:%s, rows:%"
PRId64
" %s"
,
tstrerror
(
code
),
pRes
->
info
.
rows
,
id
);
qDebug
(
"retrieve data from submit completed code:%s rows:%"
PRId64
" %s"
,
tstrerror
(
code
),
pRes
->
info
.
rows
,
id
);
if
(
code
!=
TSDB_CODE_SUCCESS
||
pRes
->
info
.
rows
==
0
)
{
qDebug
(
"retrieve data failed, try next block in submit block, %s"
,
id
);
continue
;
}
setBlockIntoRes
(
pInfo
,
pRes
,
false
);
// filter the block extracted from WAL files, according to the time window
// apply additional time window filter
doBlockDataWindowFilter
(
pRes
,
pInfo
->
primaryTsIndex
,
&
pStreamInfo
->
fillHistoryWindow
,
id
);
blockDataUpdateTsWindow
(
pInfo
->
pRes
,
pInfo
->
primaryTsIndex
);
if
(
pRes
->
info
.
rows
==
0
)
{
continue
;
}
setBlockIntoRes
(
pInfo
,
pRes
,
false
);
if
(
pInfo
->
pCreateTbRes
->
info
.
rows
>
0
)
{
pInfo
->
scanMode
=
STREAM_SCAN_FROM_RES
;
qDebug
(
"create table res exists, rows:%"
PRId64
" return from stream scan, %s"
,
pInfo
->
pCreateTbRes
->
info
.
rows
,
id
);
return
pInfo
->
pCreateTbRes
;
}
// apply additional time window filter
doBlockDataWindowFilter
(
pBlock
,
pInfo
->
primaryTsIndex
,
&
pStreamInfo
->
fillHistoryWindow
,
id
);
pBlock
->
info
.
dataLoad
=
1
;
blockDataUpdateTsWindow
(
pBlock
,
pInfo
->
primaryTsIndex
);
doCheckUpdate
(
pInfo
,
pBlockInfo
->
window
.
ekey
,
pBlock
);
doFilter
(
pBlock
,
pOperator
->
exprSupp
.
pFilterInfo
,
NULL
);
doCheckUpdate
(
pInfo
,
pBlockInfo
->
window
.
ekey
,
pInfo
->
pRes
);
doFilter
(
pInfo
->
pRes
,
pOperator
->
exprSupp
.
pFilterInfo
,
NULL
);
int64_t
numOfUpdateRes
=
pInfo
->
pUpdateDataRes
->
info
.
rows
;
qDebug
(
"%s %"
PRId64
" rows in datablock, update res:%"
PRId64
,
id
,
pBlockInfo
->
rows
,
numOfUpdateRes
);
...
...
@@ -2195,7 +2195,7 @@ FETCH_NEXT_BLOCK:
qDebug
(
"stream scan completed, and return source rows:%"
PRId64
", %s"
,
pBlockInfo
->
rows
,
id
);
if
(
pBlockInfo
->
rows
>
0
)
{
return
p
Block
;
return
p
Info
->
pRes
;
}
if
(
pInfo
->
pUpdateDataRes
->
info
.
rows
>
0
)
{
...
...
source/libs/stream/src/streamRecover.c
浏览文件 @
92d1dbd9
...
...
@@ -80,6 +80,7 @@ int32_t streamTaskLaunchScanHistory(SStreamTask* pTask) {
walReaderGetCurrentVer
(
pTask
->
exec
.
pWalReader
));
}
}
else
if
(
pTask
->
info
.
taskLevel
==
TASK_LEVEL__AGG
)
{
streamTaskEnablePause
(
pTask
);
streamSetParamForScanHistory
(
pTask
);
streamTaskScanHistoryPrepare
(
pTask
);
}
else
if
(
pTask
->
info
.
taskLevel
==
TASK_LEVEL__SINK
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录