Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
d6bb1948
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1193
Star
22018
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看板
提交
d6bb1948
编写于
7月 13, 2023
作者:
L
liuyao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
mem leak
上级
2fd72500
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
99 addition
and
8 deletion
+99
-8
source/libs/executor/src/scanoperator.c
source/libs/executor/src/scanoperator.c
+4
-1
tests/script/tsim/stream/checkpoint0.sim
tests/script/tsim/stream/checkpoint0.sim
+95
-7
未找到文件。
source/libs/executor/src/scanoperator.c
浏览文件 @
d6bb1948
...
@@ -1788,10 +1788,13 @@ void streamScanOperatorDecode(void* pBuff, int32_t len, SStreamScanInfo* pInfo)
...
@@ -1788,10 +1788,13 @@ void streamScanOperatorDecode(void* pBuff, int32_t len, SStreamScanInfo* pInfo)
buf
=
decodeSTimeWindowAggSupp
(
buf
,
&
pInfo
->
twAggSup
);
buf
=
decodeSTimeWindowAggSupp
(
buf
,
&
pInfo
->
twAggSup
);
int32_t
tlen
=
len
-
(
pBuff
-
buf
);
int32_t
tlen
=
len
-
(
pBuff
-
buf
);
void
*
pUpInfo
=
pInfo
->
stateStore
.
updateInfoInit
(
0
,
TSDB_TIME_PRECISION_MILLI
,
0
,
pInfo
->
igCheckUpdate
);
void
*
pUpInfo
=
taosMemoryCalloc
(
1
,
sizeof
(
SUpdateInfo
)
);
int32_t
code
=
pInfo
->
stateStore
.
updateInfoDeserialize
(
buf
,
tlen
,
pUpInfo
);
int32_t
code
=
pInfo
->
stateStore
.
updateInfoDeserialize
(
buf
,
tlen
,
pUpInfo
);
if
(
code
==
TSDB_CODE_SUCCESS
)
{
if
(
code
==
TSDB_CODE_SUCCESS
)
{
pInfo
->
stateStore
.
updateInfoDestroy
(
pInfo
->
pUpdateInfo
);
pInfo
->
pUpdateInfo
=
pUpInfo
;
pInfo
->
pUpdateInfo
=
pUpInfo
;
}
else
{
taosMemoryFree
(
pUpInfo
);
}
}
}
}
...
...
tests/script/tsim/stream/checkpoint0.sim
浏览文件 @
d6bb1948
...
@@ -6,18 +6,12 @@ sql connect
...
@@ -6,18 +6,12 @@ sql connect
print =============== create database
print =============== create database
sql create database test vgroups 1;
sql create database test vgroups 1;
sql select * from information_schema.ins_databases
if $rows != 3 then
return -1
endi
print $data00 $data01 $data02
sql use test;
sql use test;
sql create table t1(ts timestamp, a int, b int , c int, d double);
sql create table t1(ts timestamp, a int, b int , c int, d double);
sql create stream streams
1
trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt as select _wstart, count(*) c1, sum(a) from t1 interval(10s);
sql create stream streams
0
trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt as select _wstart, count(*) c1, sum(a) from t1 interval(10s);
sql insert into t1 values(1648791213000,1,2,3,1.0);
sql insert into t1 values(1648791213000,1,2,3,1.0);
sql insert into t1 values(1648791213001,2,2,3,1.1);
sql insert into t1 values(1648791213001,2,2,3,1.1);
...
@@ -130,4 +124,98 @@ if $data12 != 4 then
...
@@ -130,4 +124,98 @@ if $data12 != 4 then
goto loop2
goto loop2
endi
endi
sql create database test1 vgroups 4;
sql use test1;
sql create stable st(ts timestamp,a int,b int,c int, d double) tags(ta int,tb int,tc int);
sql create table t1 using st tags(1,1,1);
sql create table t2 using st tags(2,2,2);
sql create stream streams1 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt1 as select _wstart, count(*) c1, sum(a) from st interval(10s);
sql insert into t1 values(1648791213000,1,2,3,1.0);
sql insert into t2 values(1648791213001,2,2,3,1.1);
$loop_count = 0
loop2:
sleep 1000
sql select * from streamt1;
$loop_count = $loop_count + 1
if $loop_count == 20 then
return -1
endi
if $rows != 1 then
print =====rows=$rows expect 1
goto loop2
endi
# row 0
if $data01 != 2 then
print =====data01=$data01
goto loop2
endi
if $data02 != 3 then
print =====data02=$data02
goto loop2
endi
print waiting for checkpoint generation ......
sleep 25000
print restart taosd
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s start
sql insert into t1 values(1648791213002,3,2,3,1.1);
$loop_count = 0
loop3:
sleep 1000
sql select * from streamt1;
$loop_count = $loop_count + 1
if $loop_count == 20 then
return -1
endi
if $rows != 2 then
print =====rows=$rows expect 2
goto loop3
endi
# row 0
if $data01 != 3 then
print =====data01=$data01
goto loop3
endi
if $data02 != 6 then
print =====data02=$data02
goto loop3
endi
# row 1
if $data11 != 1 then
print =====data01=$data01
goto loop3
endi
if $data12 != 4 then
print =====data02=$data02
goto loop3
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录