Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
36013919
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看板
提交
36013919
编写于
10月 24, 2022
作者:
H
Haojun Liao
浏览文件
操作
浏览文件
下载
差异文件
Merge branch '3.0' into fix/liao_cov
上级
e654f3f9
ece9cb80
变更
5
展开全部
隐藏空白更改
内联
并排
Showing
5 changed file
with
255 addition
and
185 deletion
+255
-185
docs/zh/14-reference/12-config/index.md
docs/zh/14-reference/12-config/index.md
+181
-177
source/libs/stream/src/streamState.c
source/libs/stream/src/streamState.c
+7
-2
tests/docs-examples-test/taosx.sh
tests/docs-examples-test/taosx.sh
+18
-0
tests/parallel_test/container_build.sh
tests/parallel_test/container_build.sh
+1
-1
tests/script/tsim/stream/state0.sim
tests/script/tsim/stream/state0.sim
+48
-5
未找到文件。
docs/zh/14-reference/12-config/index.md
浏览文件 @
36013919
此差异已折叠。
点击以展开。
source/libs/stream/src/streamState.c
浏览文件 @
36013919
...
@@ -650,10 +650,10 @@ int32_t streamStateSessionGetKey(SStreamState* pState, const SSessionKey* key, S
...
@@ -650,10 +650,10 @@ int32_t streamStateSessionGetKey(SStreamState* pState, const SSessionKey* key, S
if
(
code
==
0
&&
sessionKeyCmpr
(
key
,
&
tmpKey
)
==
0
)
{
if
(
code
==
0
&&
sessionKeyCmpr
(
key
,
&
tmpKey
)
==
0
)
{
res
=
0
;
res
=
0
;
resKey
=
tmpKey
;
resKey
=
tmpKey
;
streamStateCurPrev
(
pState
,
pCur
);
}
else
{
}
else
{
break
;
break
;
}
}
streamStateCurPrev
(
pState
,
pCur
);
}
}
*
curKey
=
resKey
;
*
curKey
=
resKey
;
streamStateFreeCur
(
pCur
);
streamStateFreeCur
(
pCur
);
...
@@ -700,9 +700,14 @@ int32_t streamStateStateAddIfNotExist(SStreamState* pState, SSessionKey* key, ch
...
@@ -700,9 +700,14 @@ int32_t streamStateStateAddIfNotExist(SStreamState* pState, SSessionKey* key, ch
memcpy
(
tmp
,
*
pVal
,
valSize
);
memcpy
(
tmp
,
*
pVal
,
valSize
);
goto
_end
;
goto
_end
;
}
}
streamStateCurNext
(
pState
,
pCur
);
}
else
{
*
key
=
tmpKey
;
streamStateFreeCur
(
pCur
);
pCur
=
streamStateSessionSeekKeyNext
(
pState
,
key
);
}
}
streamStateCurNext
(
pState
,
pCur
);
code
=
streamStateSessionGetKVByCur
(
pCur
,
key
,
(
const
void
**
)
pVal
,
pVLen
);
code
=
streamStateSessionGetKVByCur
(
pCur
,
key
,
(
const
void
**
)
pVal
,
pVLen
);
if
(
code
==
0
)
{
if
(
code
==
0
)
{
void
*
stateKey
=
(
char
*
)(
*
pVal
)
+
(
valSize
-
keyDataLen
);
void
*
stateKey
=
(
char
*
)(
*
pVal
)
+
(
valSize
-
keyDataLen
);
...
...
tests/docs-examples-test/taosx.sh
0 → 100644
浏览文件 @
36013919
#!/bin/bash
set
-e
taosd
>>
/dev/null 2>&1 &
taosadapter
>>
/dev/null 2>&1 &
sleep
5
taosBenchmark
-y
-n
10000
-t
1000
taosx run
-f
'tmq:///test'
-t
'taos:///test1'
-y
taos
-s
'select count(*) from test1.meters'
|grep 10000000
||
(
echo
database
sync
failed!
;
exit
1
)
taosx run
-f
'tmq:///test'
-t
'local:./test-backup'
-y
taosx run
-f
'local:./test-backup'
-t
'taos:///test2'
-y
rm
-rf
./test-backup
tests/parallel_test/container_build.sh
浏览文件 @
36013919
...
@@ -52,7 +52,7 @@ fi
...
@@ -52,7 +52,7 @@ fi
docker run
\
docker run
\
-v
$REP_MOUNT_PARAM
\
-v
$REP_MOUNT_PARAM
\
--rm
--ulimit
core
=
-1
taos_test:v1.0 sh
-c
"cd
$REP_DIR
;rm -rf debug;mkdir -p debug;cd debug;cmake .. -DBUILD_HTTP=false -DBUILD_TOOLS=true -DWEBSOCKET=true;make -j
$THREAD_COUNT
"
--rm
--ulimit
core
=
-1
taos_test:v1.0 sh
-c
"cd
$REP_DIR
;rm -rf debug;mkdir -p debug;cd debug;cmake .. -DBUILD_HTTP=false -DBUILD_TOOLS=true -DWEBSOCKET=true
-DBUILD_TAOSX=true
;make -j
$THREAD_COUNT
"
ret
=
$?
ret
=
$?
exit
$ret
exit
$ret
...
...
tests/script/tsim/stream/state0.sim
浏览文件 @
36013919
...
@@ -449,12 +449,12 @@ if $data26 != 14 then
...
@@ -449,12 +449,12 @@ if $data26 != 14 then
return -1
return -1
endi
endi
sql create database test1 vgroups 1
sql create database test1 vgroups 1
;
sql select * from information_schema.ins_databases
sql select * from information_schema.ins_databases
;
print $data00 $data01 $data02
print $data00 $data01 $data02
sql use test1
sql use test1
;
sql create table t1(ts timestamp, a int, b int , c int, d double, id int);
sql create table t1(ts timestamp, a int, b int , c int, d double, id int);
sql create stream streams2 trigger at_once into streamt1 as select _wstart, count(*) c1, count(d) c2 , sum(a) c3 , max(a) c4, min(c) c5, max(id) c from t1 state_window(a);
sql create stream streams2 trigger at_once into streamt1 as select _wstart, count(*) c1, count(d) c2 , sum(a) c3 , max(a) c4, min(c) c5, max(id) c from t1 state_window(a);
...
@@ -498,7 +498,50 @@ if $data15 != 3 then
...
@@ -498,7 +498,50 @@ if $data15 != 3 then
goto loop5
goto loop5
endi
endi
sql drop database test;
sql create database test3 vgroups 1;
sql drop database test1;
sql use test3;
sql create table t1(ts timestamp, a int, b int , c int, d double, id int);
sql create stream streams3 trigger at_once into streamt3 as select _wstart, count(*) c1, sum(b) c3 from t1 state_window(a);
sql insert into t1 values(1648791212000,1,2,3,1.0,1);
sql insert into t1 values(1648791213000,2,2,3,1.0,1);
sql insert into t1 values(1648791214000,3,2,4,1.0,2);
sql insert into t1 values(1648791215000,4,2,3,1.0,1);
sql insert into t1 values(1648791211000,5,2,3,1.0,1);
sql insert into t1 values(1648791210000,6,2,4,1.0,2);
sql insert into t1 values(1648791217000,7,2,3,1.0,1);
sql insert into t1 values(1648791219000,8,2,3,1.0,1);
sql insert into t1 values(1648791209000,9,2,4,1.0,2);
sql insert into t1 values(1648791220000,10,2,4,1.0,2);
sql insert into t1 values(1648791212000,1,2,3,1.0,1);
sql insert into t1 values(1648791213000,2,2,3,1.0,1);
sql insert into t1 values(1648791214000,3,2,4,1.0,2);
sql insert into t1 values(1648791215000,4,2,3,1.0,1);
sql insert into t1 values(1648791211000,5,2,3,1.0,1);
sql insert into t1 values(1648791210000,6,2,4,1.0,2);
sql insert into t1 values(1648791217000,7,2,3,1.0,1);
sql insert into t1 values(1648791219000,8,2,3,1.0,1);
sql insert into t1 values(1648791209000,9,2,4,1.0,2);
sql insert into t1 values(1648791220000,10,2,4,1.0,2);
$loop_count = 0
loop6:
sleep 300
sql select * from streamt3;
$loop_count = $loop_count + 1
if $loop_count == 10 then
return -1
endi
if $rows != 10 then
print =====rows=$rows
goto loop6
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录