Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
17f2c3f8
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看板
提交
17f2c3f8
编写于
6月 02, 2023
作者:
L
liuyao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
reset wind info
上级
6a9c0330
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
27 addition
and
1 deletion
+27
-1
source/libs/executor/inc/executorInt.h
source/libs/executor/inc/executorInt.h
+1
-0
source/libs/executor/src/timewindowoperator.c
source/libs/executor/src/timewindowoperator.c
+25
-0
source/libs/stream/src/tstreamFileState.c
source/libs/stream/src/tstreamFileState.c
+1
-1
未找到文件。
source/libs/executor/inc/executorInt.h
浏览文件 @
17f2c3f8
...
...
@@ -456,6 +456,7 @@ typedef struct SStreamIntervalOperatorInfo {
SSHashObj
*
pUpdatedMap
;
int64_t
dataVersion
;
SStateStore
statestore
;
bool
recvGetAll
;
}
SStreamIntervalOperatorInfo
;
typedef
struct
SDataGroupInfo
{
...
...
source/libs/executor/src/timewindowoperator.c
浏览文件 @
17f2c3f8
...
...
@@ -2439,6 +2439,15 @@ static inline int winPosCmprImpl(const void* pKey1, const void* pKey2) {
return
0
;
}
static
void
resetUnCloseWinInfo
(
SSHashObj
*
winMap
)
{
void
*
pIte
=
NULL
;
int32_t
iter
=
0
;
while
((
pIte
=
tSimpleHashIterate
(
winMap
,
pIte
,
&
iter
))
!=
NULL
)
{
SRowBuffPos
*
pPos
=
*
(
SRowBuffPos
**
)
pIte
;
pPos
->
beUsed
=
true
;
}
}
static
SSDataBlock
*
doStreamFinalIntervalAgg
(
SOperatorInfo
*
pOperator
)
{
SStreamIntervalOperatorInfo
*
pInfo
=
pOperator
->
info
;
SExecTaskInfo
*
pTaskInfo
=
pOperator
->
pTaskInfo
;
...
...
@@ -2472,6 +2481,11 @@ static SSDataBlock* doStreamFinalIntervalAgg(SOperatorInfo* pOperator) {
return
pInfo
->
binfo
.
pRes
;
}
if
(
pInfo
->
recvGetAll
)
{
pInfo
->
recvGetAll
=
false
;
resetUnCloseWinInfo
(
pInfo
->
aggSup
.
pResultRowHashTable
);
}
setOperatorCompleted
(
pOperator
);
if
(
!
IS_FINAL_OP
(
pInfo
))
{
clearFunctionContext
(
&
pOperator
->
exprSupp
);
...
...
@@ -2565,6 +2579,7 @@ static SSDataBlock* doStreamFinalIntervalAgg(SOperatorInfo* pOperator) {
break
;
}
else
if
(
pBlock
->
info
.
type
==
STREAM_GET_ALL
&&
IS_FINAL_OP
(
pInfo
))
{
pInfo
->
recvGetAll
=
true
;
getAllIntervalWindow
(
pInfo
->
aggSup
.
pResultRowHashTable
,
pInfo
->
pUpdatedMap
);
continue
;
}
else
if
(
pBlock
->
info
.
type
==
STREAM_RETRIEVE
&&
!
IS_FINAL_OP
(
pInfo
))
{
...
...
@@ -2773,6 +2788,7 @@ SOperatorInfo* createStreamFinalIntervalOperatorInfo(SOperatorInfo* downstream,
compareTs
,
pInfo
->
pState
,
pInfo
->
twAggSup
.
deleteMark
);
pInfo
->
dataVersion
=
0
;
pInfo
->
statestore
=
pTaskInfo
->
storageAPI
.
stateStore
;
pInfo
->
recvGetAll
=
false
;
pOperator
->
operatorType
=
pPhyNode
->
type
;
pOperator
->
blocking
=
true
;
...
...
@@ -4751,6 +4767,12 @@ static SSDataBlock* doStreamIntervalAgg(SOperatorInfo* pOperator) {
printDataBlock
(
pInfo
->
binfo
.
pRes
,
"single interval"
);
return
pInfo
->
binfo
.
pRes
;
}
if
(
pInfo
->
recvGetAll
)
{
pInfo
->
recvGetAll
=
false
;
resetUnCloseWinInfo
(
pInfo
->
aggSup
.
pResultRowHashTable
);
}
setOperatorCompleted
(
pOperator
);
if
(
pInfo
->
twAggSup
.
maxTs
>
0
&&
pInfo
->
twAggSup
.
maxTs
-
pInfo
->
twAggSup
.
checkPointInterval
>
pInfo
->
twAggSup
.
checkPointTs
)
{
...
...
@@ -4790,6 +4812,7 @@ static SSDataBlock* doStreamIntervalAgg(SOperatorInfo* pOperator) {
continue
;
}
else
if
(
pBlock
->
info
.
type
==
STREAM_GET_ALL
)
{
qDebug
(
"===stream===single interval recv|block type STREAM_GET_ALL"
);
pInfo
->
recvGetAll
=
true
;
getAllIntervalWindow
(
pInfo
->
aggSup
.
pResultRowHashTable
,
pInfo
->
pUpdatedMap
);
continue
;
}
else
if
(
pBlock
->
info
.
type
==
STREAM_CREATE_CHILD_TABLE
)
{
...
...
@@ -4960,6 +4983,8 @@ SOperatorInfo* createStreamIntervalOperatorInfo(SOperatorInfo* downstream, SPhys
destroyStreamFinalIntervalOperatorInfo
,
optrDefaultBufFn
,
NULL
);
pInfo
->
statestore
=
pTaskInfo
->
storageAPI
.
stateStore
;
pInfo
->
recvGetAll
=
false
;
initIntervalDownStream
(
downstream
,
pPhyNode
->
type
,
pInfo
);
code
=
appendDownstream
(
pOperator
,
&
downstream
,
1
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
...
...
source/libs/stream/src/tstreamFileState.c
浏览文件 @
17f2c3f8
...
...
@@ -137,7 +137,7 @@ void clearExpiredRowBuff(SStreamFileState* pFileState, TSKEY ts, bool all) {
SListNode
*
pNode
=
NULL
;
while
((
pNode
=
tdListNext
(
&
iter
))
!=
NULL
)
{
SRowBuffPos
*
pPos
=
*
(
SRowBuffPos
**
)(
pNode
->
data
);
if
(
all
||
(
pFileState
->
getTs
(
pPos
->
pKey
)
<
ts
))
{
if
(
all
||
(
pFileState
->
getTs
(
pPos
->
pKey
)
<
ts
&&
!
pPos
->
beUsed
))
{
ASSERT
(
pPos
->
pRowBuff
!=
NULL
);
tdListAppend
(
pFileState
->
freeBuffs
,
&
(
pPos
->
pRowBuff
));
pPos
->
pRowBuff
=
NULL
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录