TDengine/tests/script/unique/dnode/remove2.sim

205 lines
4.4 KiB
Text
Raw Normal View History

2020-04-19 15:28:22 +00:00
system sh/stop_dnodes.sh
2020-04-29 09:30:03 +00:00
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3
system sh/deploy.sh -n dnode4 -i 4
2020-04-19 15:28:22 +00:00
2020-05-28 07:09:53 +00:00
system sh/cfg.sh -n dnode1 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode2 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode3 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode4 -c mnodeEqualVnodeNum -v 4
2020-04-19 15:28:22 +00:00
2020-05-14 07:03:49 +00:00
system sh/cfg.sh -n dnode1 -c wallevel -v 2
system sh/cfg.sh -n dnode2 -c wallevel -v 2
system sh/cfg.sh -n dnode3 -c wallevel -v 2
system sh/cfg.sh -n dnode4 -c wallevel -v 2
2020-04-19 15:28:22 +00:00
2020-09-17 04:06:56 +00:00
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 4
system sh/cfg.sh -n dnode2 -c maxTablesPerVnode -v 4
system sh/cfg.sh -n dnode3 -c maxTablesPerVnode -v 4
system sh/cfg.sh -n dnode4 -c maxTablesPerVnode -v 4
2020-04-19 15:28:22 +00:00
print ========== step1
2020-06-01 05:29:35 +00:00
system sh/exec.sh -n dnode1 -s start
2020-05-14 07:03:49 +00:00
sql connect
2020-04-19 15:28:22 +00:00
2020-09-07 03:39:58 +00:00
sql create database d1
2020-04-19 15:28:22 +00:00
sql create table d1.t1 (t timestamp, i int)
2020-05-20 06:40:05 +00:00
sql insert into d1.t1 values(1588262400001, 15)
sql insert into d1.t1 values(1588262400002, 14)
sql insert into d1.t1 values(1588262400003, 13)
sql insert into d1.t1 values(1588262400004, 12)
sql insert into d1.t1 values(1588262400005, 11)
2020-04-19 15:28:22 +00:00
2020-09-07 03:39:58 +00:00
sql create database d2
2020-04-19 15:28:22 +00:00
sql create table d2.t2 (t timestamp, i int)
2020-05-20 06:40:05 +00:00
sql insert into d2.t2 values(1588262400001, 25)
sql insert into d2.t2 values(1588262400002, 24)
sql insert into d2.t2 values(1588262400003, 23)
sql insert into d2.t2 values(1588262400004, 22)
sql insert into d2.t2 values(1588262400005, 21)
2020-04-19 15:28:22 +00:00
sql show dnodes
2020-05-03 15:57:11 +00:00
print dnode1 openVnodes $data2_1
if $data2_1 != 2 then
2020-04-19 15:28:22 +00:00
return -1
endi
print ========== step2
2020-05-01 07:22:27 +00:00
sql create dnode $hostname2
2020-06-01 05:29:35 +00:00
system sh/exec.sh -n dnode2 -s start
2020-12-23 10:32:18 +00:00
$x = 0
step2:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show dnodes
print dnode1 $data4_1
print dnode2 $data4_2
print dnode3 $data4_3
print dnode4 $data4_4
if $data4_1 != ready then
goto step2
endi
if $data4_2 != ready then
goto step2
endi
2020-04-19 15:28:22 +00:00
2020-09-07 03:39:58 +00:00
sql create database d3 replica 2
2020-04-19 15:28:22 +00:00
sql create table d3.t3 (t timestamp, i int)
2020-05-20 06:40:05 +00:00
sql insert into d3.t3 values(1588262400001, 35)
sql insert into d3.t3 values(1588262400002, 34)
sql insert into d3.t3 values(1588262400003, 33)
sql insert into d3.t3 values(1588262400004, 32)
sql insert into d3.t3 values(1588262400005, 31)
2020-04-19 15:28:22 +00:00
$x = 0
show2:
$x = $x + 1
sleep 2000
2020-05-14 07:03:49 +00:00
if $x == 10 then
2020-04-19 15:28:22 +00:00
return -1
endi
sql show dnodes
2020-05-03 15:57:11 +00:00
print dnode1 openVnodes $data2_1
print dnode2 openVnodes $data2_2
2020-05-14 07:03:49 +00:00
if $data2_1 != 1 then
2020-04-19 15:28:22 +00:00
goto show2
endi
2020-05-14 07:03:49 +00:00
if $data2_2 != 3 then
2020-04-19 15:28:22 +00:00
goto show2
endi
print ========== step3
2020-06-01 05:29:35 +00:00
system sh/exec.sh -n dnode2 -s stop -x SIGINT
2020-04-19 15:28:22 +00:00
sql show dnodes
2020-05-03 15:57:11 +00:00
print dnode1 openVnodes $data2_1
2020-05-14 07:03:49 +00:00
print dnode2 openVnodes $data2_2
2020-04-19 15:28:22 +00:00
print ========== step4
2020-05-01 07:22:27 +00:00
sql create dnode $hostname3
2020-06-01 05:29:35 +00:00
system sh/exec.sh -n dnode3 -s start
2020-04-19 15:28:22 +00:00
2020-12-23 10:32:18 +00:00
$x = 0
step4:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
2020-05-14 07:03:49 +00:00
sql show dnodes
print dnode1 openVnodes $data2_1
print dnode2 openVnodes $data2_2
print dnode3 openVnodes $data2_3
# wait dnode3 create first vgroup in dnode-status msg
if $data2_3 != 1 then
2020-12-23 10:32:18 +00:00
goto step4
2020-05-14 07:03:49 +00:00
endi
print ============ step 4.1
2020-06-01 05:29:35 +00:00
system sh/exec.sh -n dnode2 -s start
2020-05-14 07:03:49 +00:00
Hotfix/sangshuduo/td 3968 taosdemo datalen 16k (#5930) * [TD-3414]<test>: add insert function with json files of taodemo-testcase -repeat * [TD-3879]add stmt mode for taodemo go * [TD-3414]<test>: add insert function with json files of taodemo-testcase * [TD-3918] <test> add case to verify the bug of TD-3897 * [TD-3453]<test>:modify filepath in scripts * Update fulltest.sh * [TD-3918] <test> fix the case * Update queryFilterTswithDateUnit.py * [TD-3850]<fix>: fix vnode write enqueue flowctrl UAF & no response * Hotfix/sangshuduo/td 3401 query statistic (#5907) * [TD-3401]<fix>: taosdemo query statistic. refactor func name. * [TD-3401]<fix>: taosdemo query statistic. refactor func name 2. * [TD-3401]<fix>: taosdemo support query statistic. implementation. * cleanup * [TD-3401]<fix>: taosdemo query statistic. change us to ms. * [TD-3401]<fix>: taosdemo query statistic. increase sql buffer for query. * [TD-3401]<fix>: taosdemo query statistic more accurate result. * [TD-3401]<fix>: taosdemo query statistic. modify last time logic. Co-authored-by: Shuduo Sang <sdsang@taosdata.com> * improve coverage of operations * [TD-3944]<fix>: make default offline threshold to 10 days. (#5912) Co-authored-by: Shuduo Sang <sdsang@taosdata.com> * [TD-3572]<enhance>: response out of dnodes if #dnodes <= maxDbReplica * [TD-3937]<test>: add taosdemo performance test compare scripts * update script * Hotfix/sangshuduo/td 3317 for master (#5921) * [TD-3317]<fix>: taosdemo interlace insertion. patch for master. * [TD-3317]<fix>: taosdemo support interlace mode. adjust remainder rows logic. * [TD-3317]<fix>: taosdemo support interlace mode. fix global and stable interlace rows logic. * [TD-3317]<fix>: taosdemo support interlace mode. fix 'interlaceRows' is used uninitialized Co-authored-by: Shuduo Sang <sdsang@taosdata.com> * [TD-3968]<fix>: taosdemo data length should be 16*1024 Co-authored-by: tomchon <haoran920c@163.com> Co-authored-by: liuyq-617 <yqliu@taosdata.com> Co-authored-by: wu champion <wuchampion@foxmail.com> Co-authored-by: wu champion <cpwu@taosdata.com> Co-authored-by: Minglei Jin <mljin@taosdata.com> Co-authored-by: huili <52318143+plum-lihui@users.noreply.github.com> Co-authored-by: Shengliang Guan <slguan@taosdata.com> Co-authored-by: Shuduo Sang <sdsang@taosdata.com> Co-authored-by: Ping Xiao <pxiao@taosdata.com>
2021-04-26 10:48:52 +00:00
$x = 0
step4.1:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show dnodes
print dnode1 $data4_1
print dnode2 $data4_2
print dnode3 $data4_3
print dnode4 $data4_4
if $data4_2 != ready then
goto step4.1
endi
sql drop dnode $hostname2
2020-04-19 15:28:22 +00:00
$x = 0
show4:
$x = $x + 1
2020-12-23 10:32:18 +00:00
sleep 1000
if $x == 20 then
2020-04-19 15:28:22 +00:00
return -1
endi
sql show dnodes
2020-05-03 15:57:11 +00:00
print dnode1 openVnodes $data2_1
print dnode2 openVnodes $data2_2
print dnode3 openVnodes $data2_3
2020-05-22 12:25:01 +00:00
if $data2_1 != 1 then
2020-04-19 15:28:22 +00:00
goto show4
endi
2020-05-22 12:25:01 +00:00
if $data2_2 != null then
2020-04-19 15:28:22 +00:00
goto show4
endi
2020-05-14 07:03:49 +00:00
if $data2_3 != 3 then
2020-04-19 15:28:22 +00:00
goto show4
endi
print ========== step5
sql select * from d1.t1 order by t desc
print $data01 $data11 $data21 $data31 $data41
sql select * from d2.t2 order by t desc
print $data01 $data11 $data21 $data31 $data41
sql select * from d3.t3 order by t desc
print $data01 $data11 $data21 $data31 $data41
if $data01 != 31 then
return -1
endi
if $data11 != 32 then
return -1
endi
if $data21 != 33 then
return -1
endi
if $data31 != 34 then
return -1
endi
if $data41 != 35 then
return -1
endi
2020-05-08 07:15:23 +00:00
2020-06-01 05:29:35 +00:00
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT
system sh/exec.sh -n dnode4 -s stop -x SIGINT
system sh/exec.sh -n dnode5 -s stop -x SIGINT
system sh/exec.sh -n dnode6 -s stop -x SIGINT
system sh/exec.sh -n dnode7 -s stop -x SIGINT
system sh/exec.sh -n dnode8 -s stop -x SIGINT