未验证 提交 1d1cd322 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #2662 from taosdata/hotfix/test

[modify sim cases]
...@@ -29,7 +29,7 @@ system sh/cfg.sh -n dnode2 -c alternativeRole -v 2 ...@@ -29,7 +29,7 @@ system sh/cfg.sh -n dnode2 -c alternativeRole -v 2
system sh/cfg.sh -n dnode3 -c alternativeRole -v 2 system sh/cfg.sh -n dnode3 -c alternativeRole -v 2
system sh/cfg.sh -n dnode4 -c alternativeRole -v 2 system sh/cfg.sh -n dnode4 -c alternativeRole -v 2
$totalTableNum = 10 $totalTableNum = 40
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v $totalTableNum system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v $totalTableNum
system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v $totalTableNum system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v $totalTableNum
system sh/cfg.sh -n dnode3 -c maxtablesPerVnode -v $totalTableNum system sh/cfg.sh -n dnode3 -c maxtablesPerVnode -v $totalTableNum
...@@ -65,9 +65,10 @@ sleep 3000 ...@@ -65,9 +65,10 @@ sleep 3000
$totalTableNum = 20 $totalTableNum = 20
$sleepTimer = 3000 $sleepTimer = 3000
$maxTables = $totalTableNum * 2
$db = db $db = db
print create database $db replica 3 maxTables $totalTableNum print create database $db replica 3 maxTables $maxTables
sql create database $db replica 3 maxTables $totalTableNum sql create database $db replica 3 maxTables $maxTables
sql use $db sql use $db
# create table , insert data # create table , insert data
......
$tblStart = 0 $tblStart = 0
$tblEnd = 2000 $tblEnd = 2000
$tsStart = 1325347200000 # 2012-01-01 00:00:00.000 $tsStart = 1325347200000 # 2012-01-01 00:00:00.000
$tsEnd = 1325347210000
############################################################### ###############################################################
sql connect sql connect
$db = db1
$stb = stb1
#subtable: tb0 - tb4999
#print create table $stb (ts timestamp, c1 int) tags(t1 int, t2 binary(16))
sleep 20000 # wait other client insert data
loop_lable: loop_lable:
print ====================== client5 start loop query print ====================== client5 start loop query
$db = db2 sql use $db
$stb = stb2
sql select count(*) from $stb
print create database if not exists $db replica 2
sql create database if not exists $db replica 2 $tsQueryStart = $tsStart
sql use $db $tsQueryStart = $tsStart + 90000
sql select * from $stb where ts > $tsQueryStart and ts < $tsQueryStart order by ts asc limit 500 offset 7
print ==== client4start create table sql select * from $stb where ts > $tsQueryStart and ts < $tsQueryStart order by ts desc limit 500 offset 7
$i = $tblStart
while $i < $tblEnd sql select * from $stb where ts > $tsQueryStart and ts < $tsQueryStart and t2 == 'client1_0'
$tb = dtb . $i sql select * from $stb where ts > $tsQueryStart and ts < $tsQueryStart and t2 == 'client1_1'
sql create table $tb (ts timestamp, c1 int) sql select * from $stb where ts > $tsQueryStart and ts < $tsQueryStart and t2 == 'client1_2'
$i = $i + 1 sql select * from $stb where ts > $tsQueryStart and ts < $tsQueryStart and t2 == 'client1_3'
endw
sql select * from $stb where ts > $tsQueryStart and ts < $tsQueryStart and t2 == 'client2_0'
sql select * from $stb where ts > $tsQueryStart and ts < $tsQueryStart and t2 == 'client2_1'
print ==== client4start insert, include multi table data in one insert sql sql select * from $stb where ts > $tsQueryStart and ts < $tsQueryStart and t2 == 'client2_2'
$totalRows = 0 sql select * from $stb where ts > $tsQueryStart and ts < $tsQueryStart and t2 == 'client2_3'
$totalRowsPerTbl = 0
sql select min(c1) from $stb
$rowsPerLoop = 100 sql select max(c1) from $stb
$ts = $tsStart sql select first(*) from $stb
sql select last(*) from $stb
$i = $tblStart sql select last_row(*) from $stb
while $i < $tblEnd sql select sum(c1) from $stb
$tb0 = dtb . $i sql select avg(c1) from $stb
$i = $i + 1
$tb1 = dtb . $i sql select min(c1) from tb1
$i = $i + 1 sql select max(c1) from tb10
$tb2 = dtb . $i sql select first(*) from tb100
$i = $i + 1 sql select last(*) from tb1000
$tb3 = dtb . $i sql select last_row(*) from tb20
$i = $i + 1 sql select sum(c1) from tb200
$tb4 = dtb . $i sql select avg(c1) from tb2000
$i = $i + 1
$x = 0
while $x < $rowsPerLoop
sql insert into $tb0 values ( $ts + 0a , $x ) ( $ts + 2a , $x ) ( $ts + 4a , $x ) ( $ts + 6a , $x ) ( $ts + 8a , $x ) ( $ts + 10a , $x ) ( $ts + 12a , $x ) ( $ts + 14a , $x ) ( $ts + 16a , $x ) ( $ts + 18a , $x ) ( $ts + 20a , $x ) ( $ts + 22a , $x ) ( $ts + 24a , $x ) ( $ts + 26a , $x ) ( $ts + 28a , $x ) ( $ts + 30a , $x ) ( $ts + 32a , $x ) ( $ts + 34a , $x ) ( $ts + 36a , $x ) ( $ts + 38a , $x ) $tb1 values ( $ts + 0a , $x ) ( $ts + 2a , $x ) ( $ts + 4a , $x ) ( $ts + 6a , $x ) ( $ts + 8a , $x ) ( $ts + 10a , $x ) ( $ts + 12a , $x ) ( $ts + 14a , $x ) ( $ts + 16a , $x ) ( $ts + 18a , $x ) ( $ts + 20a , $x ) ( $ts + 22a , $x ) ( $ts + 24a , $x ) ( $ts + 26a , $x ) ( $ts + 28a , $x ) ( $ts + 30a , $x ) ( $ts + 32a , $x ) ( $ts + 34a , $x ) ( $ts + 36a , $x ) ( $ts + 38a , $x ) $tb2 values ( $ts + 0a , $x ) ( $ts + 2a , $x ) ( $ts + 4a , $x ) ( $ts + 6a , $x ) ( $ts + 8a , $x ) ( $ts + 10a , $x ) ( $ts + 12a , $x ) ( $ts + 14a , $x ) ( $ts + 16a , $x ) ( $ts + 18a , $x ) ( $ts + 20a , $x ) ( $ts + 22a , $x ) ( $ts + 24a , $x ) ( $ts + 26a , $x ) ( $ts + 28a , $x ) ( $ts + 30a , $x ) ( $ts + 32a , $x ) ( $ts + 34a , $x ) ( $ts + 36a , $x ) ( $ts + 38a , $x ) $tb3 values ( $ts + 0a , $x ) ( $ts + 2a , $x ) ( $ts + 4a , $x ) ( $ts + 6a , $x ) ( $ts + 8a , $x ) ( $ts + 10a , $x ) ( $ts + 12a , $x ) ( $ts + 14a , $x ) ( $ts + 16a , $x ) ( $ts + 18a , $x ) ( $ts + 20a , $x ) ( $ts + 22a , $x ) ( $ts + 24a , $x ) ( $ts + 26a , $x ) ( $ts + 28a , $x ) ( $ts + 30a , $x ) ( $ts + 32a , $x ) ( $ts + 34a , $x ) ( $ts + 36a , $x ) ( $ts + 38a , $x ) $tb4 values ( $ts + 0a , $x ) ( $ts + 2a , $x ) ( $ts + 4a , $x ) ( $ts + 6a , $x ) ( $ts + 8a , $x ) ( $ts + 10a , $x ) ( $ts + 12a , $x ) ( $ts + 14a , $x ) ( $ts + 16a , $x ) ( $ts + 18a , $x ) ( $ts + 20a , $x ) ( $ts + 22a , $x ) ( $ts + 24a , $x ) ( $ts + 26a , $x ) ( $ts + 28a , $x ) ( $ts + 30a , $x ) ( $ts + 32a , $x ) ( $ts + 34a , $x ) ( $ts + 36a , $x ) ( $ts + 38a , $x )
$x = $x + 20
$ts = $ts + 40a
endw
$totalRowsPerTbl = $totalRowsPerTbl + $x
$x = $x * 5
$totalRows = $totalRows + $x
endw
sql select count(*) from tb10
if $data00 != $totalRowsPerTbl then
print data00 $data00 totalRowsPerTbl $totalRowsPerTbl
print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
print ************ client4 insert loss: $deltaRows *****
print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
endi
print ====client4 start alter table
$i = $tblStart
while $i < $tblEnd
$tb = dtb . $i
sql alter table $tb add c2 float
$i = $i + 1
endw
print ====client4 continue insert, include multi table data in one insert sql
$i = $tblStart
while $i < $tblEnd
$tb0 = dtb . $i
$i = $i + 1
$tb1 = dtb . $i
$i = $i + 1
$tb2 = dtb . $i
$i = $i + 1
$tb3 = dtb . $i
$i = $i + 1
$tb4 = dtb . $i
$i = $i + 1
$x = 0
while $x < $rowsPerLoop
sql insert into $tb0 values ( $ts + 0a , $x ) ( $ts + 2a , $x ) ( $ts + 4a , $x ) ( $ts + 6a , $x ) ( $ts + 8a , $x ) ( $ts + 10a , $x ) ( $ts + 12a , $x ) ( $ts + 14a , $x ) ( $ts + 16a , $x ) ( $ts + 18a , $x ) ( $ts + 20a , $x ) ( $ts + 22a , $x ) ( $ts + 24a , $x ) ( $ts + 26a , $x ) ( $ts + 28a , $x ) ( $ts + 30a , $x ) ( $ts + 32a , $x ) ( $ts + 34a , $x ) ( $ts + 36a , $x ) ( $ts + 38a , $x ) $tb1 values ( $ts + 0a , $x ) ( $ts + 2a , $x ) ( $ts + 4a , $x ) ( $ts + 6a , $x ) ( $ts + 8a , $x ) ( $ts + 10a , $x ) ( $ts + 12a , $x ) ( $ts + 14a , $x ) ( $ts + 16a , $x ) ( $ts + 18a , $x ) ( $ts + 20a , $x ) ( $ts + 22a , $x ) ( $ts + 24a , $x ) ( $ts + 26a , $x ) ( $ts + 28a , $x ) ( $ts + 30a , $x ) ( $ts + 32a , $x ) ( $ts + 34a , $x ) ( $ts + 36a , $x ) ( $ts + 38a , $x ) $tb2 values ( $ts + 0a , $x ) ( $ts + 2a , $x ) ( $ts + 4a , $x ) ( $ts + 6a , $x ) ( $ts + 8a , $x ) ( $ts + 10a , $x ) ( $ts + 12a , $x ) ( $ts + 14a , $x ) ( $ts + 16a , $x ) ( $ts + 18a , $x ) ( $ts + 20a , $x ) ( $ts + 22a , $x ) ( $ts + 24a , $x ) ( $ts + 26a , $x ) ( $ts + 28a , $x ) ( $ts + 30a , $x ) ( $ts + 32a , $x ) ( $ts + 34a , $x ) ( $ts + 36a , $x ) ( $ts + 38a , $x ) $tb3 values ( $ts + 0a , $x ) ( $ts + 2a , $x ) ( $ts + 4a , $x ) ( $ts + 6a , $x ) ( $ts + 8a , $x ) ( $ts + 10a , $x ) ( $ts + 12a , $x ) ( $ts + 14a , $x ) ( $ts + 16a , $x ) ( $ts + 18a , $x ) ( $ts + 20a , $x ) ( $ts + 22a , $x ) ( $ts + 24a , $x ) ( $ts + 26a , $x ) ( $ts + 28a , $x ) ( $ts + 30a , $x ) ( $ts + 32a , $x ) ( $ts + 34a , $x ) ( $ts + 36a , $x ) ( $ts + 38a , $x ) $tb4 values ( $ts + 0a , $x ) ( $ts + 2a , $x ) ( $ts + 4a , $x ) ( $ts + 6a , $x ) ( $ts + 8a , $x ) ( $ts + 10a , $x ) ( $ts + 12a , $x ) ( $ts + 14a , $x ) ( $ts + 16a , $x ) ( $ts + 18a , $x ) ( $ts + 20a , $x ) ( $ts + 22a , $x ) ( $ts + 24a , $x ) ( $ts + 26a , $x ) ( $ts + 28a , $x ) ( $ts + 30a , $x ) ( $ts + 32a , $x ) ( $ts + 34a , $x ) ( $ts + 36a , $x ) ( $ts + 38a , $x )
$x = $x + 20
$ts = $ts + 40a
endw
$totalRowsPerTbl = $totalRowsPerTbl + $x
$x = $x * 5
$totalRows = $totalRows + $x
endw
sql select count(*) from tb10
if $data00 != $totalRowsPerTbl then
print data00 $data00 totalRowsPerTbl $totalRowsPerTbl
print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
print ************ client4 insert loss: $deltaRows *****
print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
endi
print ====================== client4 drop database
sql drop if exists database $db
goto loop_lable goto loop_lable
\ No newline at end of file
...@@ -80,6 +80,7 @@ run_back unique/cluster/main1_client1_2.sim ...@@ -80,6 +80,7 @@ run_back unique/cluster/main1_client1_2.sim
run_back unique/cluster/main1_client1_3.sim run_back unique/cluster/main1_client1_3.sim
run_back unique/cluster/client3.sim run_back unique/cluster/client3.sim
run_back unique/cluster/client4.sim run_back unique/cluster/client4.sim
run_back unique/cluster/client5.sim
sleep 20000 sleep 20000
......
...@@ -84,6 +84,7 @@ run_back unique/cluster/main2_client2_2.sim ...@@ -84,6 +84,7 @@ run_back unique/cluster/main2_client2_2.sim
run_back unique/cluster/main2_client2_3.sim run_back unique/cluster/main2_client2_3.sim
run_back unique/cluster/client3.sim run_back unique/cluster/client3.sim
run_back unique/cluster/client4.sim run_back unique/cluster/client4.sim
run_back unique/cluster/client5.sim
sleep 20000 sleep 20000
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册