Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
51e503dd
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看板
未验证
提交
51e503dd
编写于
3月 15, 2023
作者:
S
Shengliang Guan
提交者:
GitHub
3月 15, 2023
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #20464 from taosdata/fix/TD-23156
fix:source task needs to wait && stream state window does not handle null
上级
dd2940b8
25732f7c
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
107 addition
and
16 deletion
+107
-16
source/libs/executor/src/timewindowoperator.c
source/libs/executor/src/timewindowoperator.c
+1
-1
source/libs/stream/src/streamExec.c
source/libs/stream/src/streamExec.c
+1
-1
tests/script/tsim/stream/deleteState.sim
tests/script/tsim/stream/deleteState.sim
+2
-7
tests/script/tsim/stream/partitionbyColumnState.sim
tests/script/tsim/stream/partitionbyColumnState.sim
+2
-7
tests/script/tsim/stream/state1.sim
tests/script/tsim/stream/state1.sim
+101
-0
未找到文件。
source/libs/executor/src/timewindowoperator.c
浏览文件 @
51e503dd
...
...
@@ -3911,7 +3911,7 @@ static void doStreamStateAggImpl(SOperatorInfo* pOperator, SSDataBlock* pSDataBl
blockDataEnsureCapacity
(
pAggSup
->
pScanBlock
,
rows
);
SColumnInfoData
*
pKeyColInfo
=
taosArrayGet
(
pSDataBlock
->
pDataBlock
,
pInfo
->
stateCol
.
slotId
);
for
(
int32_t
i
=
0
;
i
<
rows
;
i
+=
winRows
)
{
if
(
pInfo
->
ignoreExpiredData
&&
isOverdue
(
tsCols
[
i
],
&
pInfo
->
twAggSup
))
{
if
(
pInfo
->
ignoreExpiredData
&&
isOverdue
(
tsCols
[
i
],
&
pInfo
->
twAggSup
)
||
colDataIsNull_s
(
pKeyColInfo
,
i
)
)
{
i
++
;
continue
;
}
...
...
source/libs/stream/src/streamExec.c
浏览文件 @
51e503dd
...
...
@@ -20,7 +20,7 @@
static
int32_t
streamTaskExecImpl
(
SStreamTask
*
pTask
,
const
void
*
data
,
SArray
*
pRes
)
{
int32_t
code
;
void
*
exec
=
pTask
->
exec
.
executor
;
while
(
atomic_load_8
(
&
pTask
->
taskStatus
)
!=
TASK_STATUS__NORMAL
)
{
while
(
pTask
->
taskLevel
==
TASK_LEVEL__SOURCE
&&
atomic_load_8
(
&
pTask
->
taskStatus
)
!=
TASK_STATUS__NORMAL
)
{
qError
(
"stream task wait for the end of fill history"
);
taosMsleep
(
2
);
continue
;
...
...
tests/script/tsim/stream/deleteState.sim
浏览文件 @
51e503dd
...
...
@@ -51,13 +51,8 @@ if $loop_count == 10 then
return -1
endi
if $data01 != 1 then
print =====data01=$data01
goto loop1
endi
if $data02 != NULL then
print =====data02=$data02
if $rows != 0 then
print =====rows=$rows
goto loop1
endi
...
...
tests/script/tsim/stream/partitionbyColumnState.sim
浏览文件 @
51e503dd
...
...
@@ -27,13 +27,8 @@ if $loop_count == 10 then
return -1
endi
if $data01 != 1 then
print =====data01=$data01
goto loop0
endi
if $data02 != NULL then
print =====data02=$data02
if $rows != 0 then
print =====rows=$rows
goto loop0
endi
...
...
tests/script/tsim/stream/state1.sim
0 → 100644
浏览文件 @
51e503dd
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
sleep 50
sql connect
print =============== create database
sql create database test vgroups 4;
sql select * from information_schema.ins_databases;
if $rows != 3 then
return -1
endi
print $data00 $data01 $data02
sql use test;
sql create table t1(ts timestamp, a int, b int , c int, d double, id int);
print create stream streams1 trigger at_once IGNORE EXPIRED 0 into streamt1 as select _wstart, count(*) c1 from t1 state_window(a);
sql create stream streams1 trigger at_once IGNORE EXPIRED 0 into streamt1 as select _wstart, count(*) c1 from t1 state_window(a);
sql insert into t1(ts) values(1648791213000);
$loop_count = 0
loop0:
sleep 300
$loop_count = $loop_count + 1
if $loop_count == 10 then
return -1
endi
sql select * from streamt1;
print data00 data01
print data10 data11
if $rows != 0 then
print =====rows=$rows
goto loop0
endi
sql insert into t1 values(1648791214000,1,2,3,1.0,3);
$loop_count = 0
loop1:
sleep 300
$loop_count = $loop_count + 1
if $loop_count == 10 then
return -1
endi
sql select * from streamt1;
print data00 data01
print data10 data11
if $rows != 1 then
print =====rows=$rows
goto loop1
endi
sql insert into t1 values(1648791215000,2,2,3,1.0,4);
$loop_count = 0
loop2:
sleep 300
$loop_count = $loop_count + 1
if $loop_count == 10 then
return -1
endi
sql select * from streamt1;
if $rows != 2 then
print =====rows=$rows
goto loop2
endi
sql insert into t1(ts) values(1648791216000);
$loop_count = 0
loop3:
sleep 300
$loop_count = $loop_count + 1
if $loop_count == 10 then
return -1
endi
sql select * from streamt1;
if $rows != 2 then
print =====rows=$rows
goto loop2
endi
print state1 end
system sh/stop_dnodes.sh
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录