Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
099ffbd0
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
099ffbd0
编写于
5月 02, 2020
作者:
S
slguan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-184] add db replica alter scripts
上级
2f011a42
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
52 addition
and
1631 deletion
+52
-1631
tests/script/unique/cluster/backup/balance4.sim
tests/script/unique/cluster/backup/balance4.sim
+0
-759
tests/script/unique/cluster/backup/balance5.sim
tests/script/unique/cluster/backup/balance5.sim
+0
-413
tests/script/unique/cluster/backup/balancex.sim
tests/script/unique/cluster/backup/balancex.sim
+0
-372
tests/script/unique/cluster/testSuite.sim
tests/script/unique/cluster/testSuite.sim
+5
-5
tests/script/unique/column/testSuite.sim
tests/script/unique/column/testSuite.sim
+1
-1
tests/script/unique/db/replica_add13.sim
tests/script/unique/db/replica_add13.sim
+8
-12
tests/script/unique/db/replica_add23.sim
tests/script/unique/db/replica_add23.sim
+8
-12
tests/script/unique/db/replica_part.sim
tests/script/unique/db/replica_part.sim
+0
-2
tests/script/unique/db/replica_reduce21.sim
tests/script/unique/db/replica_reduce21.sim
+0
-2
tests/script/unique/db/replica_reduce31.sim
tests/script/unique/db/replica_reduce31.sim
+0
-2
tests/script/unique/db/replica_reduce32.sim
tests/script/unique/db/replica_reduce32.sim
+23
-39
tests/script/unique/mnode/mgmt33.sim
tests/script/unique/mnode/mgmt33.sim
+4
-4
tests/script/unique/mnode/mgmt34.sim
tests/script/unique/mnode/mgmt34.sim
+1
-6
tests/script/unique/mnode/testSuite.sim
tests/script/unique/mnode/testSuite.sim
+2
-2
未找到文件。
tests/script/unique/cluster/backup/balance4.sim
已删除
100644 → 0
浏览文件 @
2f011a42
system sh/stop_dnodes.sh
sleep 1000
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
system sh/deploy.sh -n dnode5 -i 5
system sh/deploy.sh -n dnode6 -i 6
system sh/deploy.sh -n dnode7 -i 7
system sh/deploy.sh -n dnode8 -i 8
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode5 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode6 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode7 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode8 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c statusInterval -v 1
system sh/cfg.sh -n dnode2 -c statusInterval -v 1
system sh/cfg.sh -n dnode3 -c statusInterval -v 1
system sh/cfg.sh -n dnode4 -c statusInterval -v 1
system sh/cfg.sh -n dnode5 -c statusInterval -v 1
system sh/cfg.sh -n dnode6 -c statusInterval -v 1
system sh/cfg.sh -n dnode7 -c statusInterval -v 1
system sh/cfg.sh -n dnode8 -c statusInterval -v 1
system sh/cfg.sh -n dnode1 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode2 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode3 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode4 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode5 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode6 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode7 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode8 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode1 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode2 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode5 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode6 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode7 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode8 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode1 -c commitLog -v 0
system sh/cfg.sh -n dnode2 -c commitLog -v 0
system sh/cfg.sh -n dnode3 -c commitLog -v 0
system sh/cfg.sh -n dnode4 -c commitLog -v 0
system sh/cfg.sh -n dnode5 -c commitLog -v 0
system sh/cfg.sh -n dnode6 -c commitLog -v 0
system sh/cfg.sh -n dnode7 -c commitLog -v 0
system sh/cfg.sh -n dnode8 -c commitLog -v 0
system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 0
system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 0
system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 0
system sh/cfg.sh -n dnode4 -c mgmtEqualVnodeNum -v 0
system sh/cfg.sh -n dnode5 -c mgmtEqualVnodeNum -v 0
system sh/cfg.sh -n dnode6 -c mgmtEqualVnodeNum -v 0
system sh/cfg.sh -n dnode7 -c mgmtEqualVnodeNum -v 0
system sh/cfg.sh -n dnode8 -c mgmtEqualVnodeNum -v 0
print ============== step1
print ========= start dnode1
system sh/exec.sh -n dnode1 -s start
$x = 0
connectTbase:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql connect -x connectTbase
sql create dnode $hostname2
sql create dnode $hostname3
sql create dnode $hostname4
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode4 -s start
sleep 4001
$x = 0
created1:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql create database c_b4_d1 replica 4 -x created1
sql use c_b4_d1
$x = 0
create1:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql create table c_b4_t1 (t timestamp, i int) -x create1
sql insert into c_b4_t1 values(now+1s, 15)
sql insert into c_b4_t1 values(now+2s, 14)
sql insert into c_b4_t1 values(now+2s, 13)
sql insert into c_b4_t1 values(now+3s, 12)
sql insert into c_b4_t1 values(now+4s, 11)
sql create database c_b4_d2 replica 4
sql use c_b4_d2
$x = 0
create2:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql create table c_b4_t2 (t timestamp, i int) -x create2
sql insert into c_b4_t2 values(now+1s, 25)
sql insert into c_b4_t2 values(now+2s, 24)
sql insert into c_b4_t2 values(now+3s, 23)
sql insert into c_b4_t2 values(now+4s, 22)
sql insert into c_b4_t2 values(now+5s, 21)
sql create database c_b4_d3 replica 4
sql use c_b4_d3
$x = 0
create3:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql create table c_b4_t3 (t timestamp, i int) -x create3
sql insert into c_b4_t3 values(now+1s, 35)
sql insert into c_b4_t3 values(now+2s, 34)
sql insert into c_b4_t3 values(now+3s, 33)
sql insert into c_b4_t3 values(now+4s, 32)
sql insert into c_b4_t3 values(now+5s, 31)
$x = 0
show1:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql show dnodes -x show1
$dnode1Vnodes = $data3_192.168.0.1
print dnode1 $dnode1Vnodes
$dnode2Vnodes = $data3_192.168.0.2
print dnode2 $dnode2Vnodes
$dnode3Vnodes = $data3_192.168.0.3
print dnode3 $dnode3Vnodes
$dnode4Vnodes = $data3_192.168.0.4
print dnode4 $dnode4Vnodes
$dnode5Vnodes = $data3_192.168.0.5
print dnode5 $dnode5Vnodes
if $dnode1Vnodes != 1 then
goto show1
endi
if $dnode2Vnodes != 1 then
goto show1
endi
if $dnode3Vnodes != 1 then
goto show1
endi
if $dnode4Vnodes != 1 then
goto show1
endi
if $dnode5Vnodes != null then
goto show1
endi
print ============================== step2
print ========= start dnode5
sql create dnode $hostname5
system sh/exec.sh -n dnode5 -s start
sleep 9000
$x = 0
show2:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql show dnodes -x show2
$dnode1Vnodes = $data3_192.168.0.1
print dnode1 $dnode1Vnodes
$dnode2Vnodes = $data3_192.168.0.2
print dnode2 $dnode2Vnodes
$dnode3Vnodes = $data3_192.168.0.3
print dnode3 $dnode3Vnodes
$dnode4Vnodes = $data3_192.168.0.4
print dnode4 $dnode4Vnodes
$dnode5Vnodes = $data3_192.168.0.5
print dnode5 $dnode5Vnodes
if $dnode5Vnodes != 2 then
goto show2
endi
print ============================== step3
print ========= drop dnode2
sql drop dnode $hostname2
sleep 9000
$x = 0
show3:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql show dnodes -x show3
$dnode1Vnodes = $data3_192.168.0.1
print dnode1 $dnode1Vnodes
$dnode2Vnodes = $data3_192.168.0.2
print dnode2 $dnode2Vnodes
$dnode3Vnodes = $data3_192.168.0.3
print dnode3 $dnode3Vnodes
$dnode4Vnodes = $data3_192.168.0.4
print dnode4 $dnode4Vnodes
$dnode5Vnodes = $data3_192.168.0.5
print dnode5 $dnode5Vnodes
if $dnode1Vnodes != 1 then
goto show3
endi
if $dnode2Vnodes != null then
goto show3
endi
if $dnode3Vnodes != 1 then
goto show3
endi
if $dnode4Vnodes != 1 then
goto show3
endi
if $dnode5Vnodes != 1 then
goto show3
endi
system sh/exec.sh -n dnode2 -s stop
print ============================== step4
print ========= start dnode2
sql create dnode $hostname2
system sh/exec.sh -n dnode2 -s start
sleep 10000
$x = 0
show4:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql show dnodes -x show4
$dnode1Vnodes = $data3_192.168.0.1
print dnode1 $dnode1Vnodes
$dnode2Vnodes = $data3_192.168.0.2
print dnode2 $dnode2Vnodes
$dnode3Vnodes = $data3_192.168.0.3
print dnode3 $dnode3Vnodes
$dnode4Vnodes = $data3_192.168.0.4
print dnode4 $dnode4Vnodes
$dnode5Vnodes = $data3_192.168.0.5
print dnode5 $dnode5Vnodes
if $dnode2Vnodes != 2 then
goto show4
endi
print ============================== step5
print ========= drop dnode3
sql drop dnode $hostname3
sleep 9000
$x = 0
show5:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql show dnodes -x show5
$dnode1Vnodes = $data3_192.168.0.1
print dnode1 $dnode1Vnodes
$dnode2Vnodes = $data3_192.168.0.2
print dnode2 $dnode2Vnodes
$dnode3Vnodes = $data3_192.168.0.3
print dnode3 $dnode3Vnodes
$dnode4Vnodes = $data3_192.168.0.4
print dnode4 $dnode4Vnodes
$dnode5Vnodes = $data3_192.168.0.5
print dnode5 $dnode5Vnodes
if $dnode1Vnodes != 1 then
goto show5
endi
if $dnode2Vnodes != 1 then
goto show5
endi
if $dnode3Vnodes != null then
goto show5
endi
if $dnode4Vnodes != 1 then
goto show5
endi
if $dnode5Vnodes != 1 then
goto show5
endi
system sh/exec.sh -n dnode3 -s stop
print ============================== step6
print ========= start dnode3
sql create dnode $hostname3
system sh/exec.sh -n dnode3 -s start
sleep 9000
$x = 0
show6:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql show dnodes -x show6
$dnode1Vnodes = $data3_192.168.0.1
print dnode1 $dnode1Vnodes
$dnode2Vnodes = $data3_192.168.0.2
print dnode2 $dnode2Vnodes
$dnode3Vnodes = $data3_192.168.0.3
print dnode3 $dnode3Vnodes
$dnode4Vnodes = $data3_192.168.0.4
print dnode4 $dnode4Vnodes
$dnode5Vnodes = $data3_192.168.0.5
print dnode5 $dnode5Vnodes
if $dnode3Vnodes != 2 then
goto show6
endi
print ============================== step7
print ========= drop dnode4
sql drop dnode $hostname4
sleep 9000
$x = 0
show7:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql show dnodes -x show7
$dnode1Vnodes = $data3_192.168.0.1
print dnode1 $dnode1Vnodes
$dnode2Vnodes = $data3_192.168.0.2
print dnode2 $dnode2Vnodes
$dnode3Vnodes = $data3_192.168.0.3
print dnode3 $dnode3Vnodes
$dnode4Vnodes = $data3_192.168.0.4
print dnode4 $dnode4Vnodes
$dnode5Vnodes = $data3_192.168.0.5
print dnode5 $dnode5Vnodes
if $dnode1Vnodes != 1 then
goto show7
endi
if $dnode2Vnodes != 1 then
goto show7
endi
if $dnode3Vnodes != 1 then
goto show7
endi
if $dnode4Vnodes != null then
goto show7
endi
if $dnode5Vnodes != 1 then
goto show7
endi
system sh/exec.sh -n dnode4 -s stop
print ============================== step8
print ========= start dnode4
sql create dnode $hostname4
system sh/exec.sh -n dnode4 -s start
sleep 9000
$x = 0
show8:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql show dnodes -x show8
$dnode1Vnodes = $data3_192.168.0.1
print dnode1 $dnode1Vnodes
$dnode2Vnodes = $data3_192.168.0.2
print dnode2 $dnode2Vnodes
$dnode3Vnodes = $data3_192.168.0.3
print dnode3 $dnode3Vnodes
$dnode4Vnodes = $data3_192.168.0.4
print dnode4 $dnode4Vnodes
$dnode5Vnodes = $data3_192.168.0.5
print dnode5 $dnode5Vnodes
if $dnode4Vnodes != 2 then
goto show8
endi
print ============================== step9
print ========= drop dnode5
sql drop dnode $hostname5
sleep 9000
$x = 0
show9:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql show dnodes -x show9
$dnode1Vnodes = $data3_192.168.0.1
print dnode1 $dnode1Vnodes
$dnode2Vnodes = $data3_192.168.0.2
print dnode2 $dnode2Vnodes
$dnode3Vnodes = $data3_192.168.0.3
print dnode3 $dnode3Vnodes
$dnode4Vnodes = $data3_192.168.0.4
print dnode4 $dnode4Vnodes
$dnode5Vnodes = $data3_192.168.0.5
print dnode5 $dnode5Vnodes
if $dnode1Vnodes != 1 then
goto show9
endi
if $dnode2Vnodes != 1 then
goto show9
endi
if $dnode3Vnodes != 1 then
goto show9
endi
if $dnode4Vnodes != 1 then
goto show9
endi
if $dnode5Vnodes != null then
goto show9
endi
system sh/exec.sh -n dnode5 -s stop
print ============================== step10
print ========= start dnode5
sql create dnode $hostname5
system sh/exec.sh -n dnode5 -s start
sleep 9000
$x = 0
show10:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql show dnodes -x show10
$dnode1Vnodes = $data3_192.168.0.1
print dnode1 $dnode1Vnodes
$dnode2Vnodes = $data3_192.168.0.2
print dnode2 $dnode2Vnodes
$dnode3Vnodes = $data3_192.168.0.3
print dnode3 $dnode3Vnodes
$dnode4Vnodes = $data3_192.168.0.4
print dnode4 $dnode4Vnodes
$dnode5Vnodes = $data3_192.168.0.5
print dnode5 $dnode5Vnodes
if $dnode5Vnodes != 2 then
goto show10
endi
print ============================== step11
print ========= drop dnode1
system sh/exec.sh -n dnode1 -s stop
print stop dnode1 and sleep 10000
sleep 10000
sql drop dnode $hostname1
print drop dnode1 and sleep 9000
sleep 9000
$x = 0
show11:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql show dnodes -x show11
$dnode1Vnodes = $data3_192.168.0.1
print dnode1 $dnode1Vnodes
$dnode2Vnodes = $data3_192.168.0.2
print dnode2 $dnode2Vnodes
$dnode3Vnodes = $data3_192.168.0.3
print dnode3 $dnode3Vnodes
$dnode4Vnodes = $data3_192.168.0.4
print dnode4 $dnode4Vnodes
$dnode5Vnodes = $data3_192.168.0.5
print dnode5 $dnode5Vnodes
if $dnode1Vnodes != null then
goto show11
endi
if $dnode2Vnodes != 1 then
goto show11
endi
if $dnode3Vnodes != 1 then
goto show11
endi
if $dnode4Vnodes != 1 then
goto show11
endi
if $dnode5Vnodes != 1 then
goto show11
endi
print ============================== step12
print ========= start dnode1
sql create dnode $hostname1
system sh/exec.sh -n dnode1 -s start
sleep 12000
$x = 0
show12:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql show dnodes -x show12
$dnode1Vnodes = $data3_192.168.0.1
print dnode1 $dnode1Vnodes
$dnode2Vnodes = $data3_192.168.0.2
print dnode2 $dnode2Vnodes
$dnode3Vnodes = $data3_192.168.0.3
print dnode3 $dnode3Vnodes
$dnode4Vnodes = $data3_192.168.0.4
print dnode4 $dnode4Vnodes
$dnode5Vnodes = $data3_192.168.0.5
print dnode5 $dnode5Vnodes
if $dnode1Vnodes != 2 then
goto show12
endi
print ============================== step13
print ========= add db4
sql create database c_b4_d4 replica 4
sql use c_b4_d4
$x = 0
create4:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql create table c_b4_t4 (t timestamp, i int) -x create4
sql insert into c_b4_t4 values(now+1s, 45)
sql insert into c_b4_t4 values(now+2s, 44)
sql insert into c_b4_t4 values(now+3s, 43)
sql insert into c_b4_t4 values(now+4s, 42)
sql insert into c_b4_t4 values(now+5s, 41)
sql create database c_b4_d5 replica 4
sql use c_b4_d5;
$x = 0
create5:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql create table c_b4_t5 (t timestamp, i int) -x create5
sql insert into c_b4_t5 values(now+1s, 55)
sql insert into c_b4_t5 values(now+2s, 54)
sql insert into c_b4_t5 values(now+3s, 53)
sql insert into c_b4_t5 values(now+4s, 52)
sql insert into c_b4_t5 values(now+5s, 51)
$x = 0
show13:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql show dnodes -x show13
$dnode1Vnodes = $data3_192.168.0.1
print dnode1 $dnode1Vnodes
$dnode2Vnodes = $data3_192.168.0.2
print dnode2 $dnode2Vnodes
$dnode3Vnodes = $data3_192.168.0.3
print dnode3 $dnode3Vnodes
$dnode4Vnodes = $data3_192.168.0.4
print dnode4 $dnode4Vnodes
$dnode5Vnodes = $data3_192.168.0.5
print dnode5 $dnode5Vnodes
if $dnode1Vnodes != 0 then
goto show13
endi
if $dnode2Vnodes != 0 then
goto show13
endi
if $dnode3Vnodes != 0 then
goto show13
endi
if $dnode4Vnodes != 0 then
goto show13
endi
if $dnode4Vnodes != 0 then
goto show13
endi
print ============================== step14
print ========= check data
sql use c_b4_d1
sql select * from c_b4_t1
print $data01 $data11 $data21 $data31 $data41
if $data01 != 11 then
return -1
endi
if $data11 != 12 then
return -1
endi
if $data21 != 13 then
return -1
endi
if $data31 != 14 then
return -1
endi
if $data41 != 15 then
return -1
endi
sql use c_b4_d2
sql select * from c_b4_t2
print $data01 $data11 $data21 $data31 $data41
if $data01 != 21 then
return -1
endi
if $data11 != 22 then
return -1
endi
if $data21 != 23 then
return -1
endi
if $data31 != 24 then
return -1
endi
if $data41 != 25 then
return -1
endi
sql use c_b4_d3
sql select * from c_b4_t3
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
sql use c_b4_d4
sql select * from c_b4_t4
print $data01 $data11 $data21 $data31 $data41
if $data01 != 41 then
return -1
endi
if $data11 != 42 then
return -1
endi
if $data21 != 43 then
return -1
endi
if $data31 != 44 then
return -1
endi
if $data41 != 45 then
return -1
endi
sql use c_b4_d5
sql select * from c_b4_t5
print $data01 $data11 $data21 $data31 $data41
if $data01 != 51 then
return -1
endi
if $data11 != 52 then
return -1
endi
if $data21 != 53 then
return -1
endi
if $data31 != 54 then
return -1
endi
if $data41 != 55 then
return -1
endi
print ============================================ over
system sh/exec.sh -n dnode1 -s stop
system sh/exec.sh -n dnode2 -s stop
system sh/exec.sh -n dnode3 -s stop
system sh/exec.sh -n dnode4 -s stop
system sh/exec.sh -n dnode5 -s stop
system sh/exec.sh -n dnode6 -s stop
system sh/exec.sh -n dnode7 -s stop
system sh/exec.sh -n dnode8 -s stop
tests/script/unique/cluster/backup/balance5.sim
已删除
100644 → 0
浏览文件 @
2f011a42
system sh/stop_dnodes.sh
sleep 1000
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
system sh/deploy.sh -n dnode5 -i 5
system sh/deploy.sh -n dnode6 -i 6
system sh/deploy.sh -n dnode7 -i 7
system sh/deploy.sh -n dnode8 -i 8
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode5 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode6 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode7 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode8 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c statusInterval -v 1
system sh/cfg.sh -n dnode2 -c statusInterval -v 1
system sh/cfg.sh -n dnode3 -c statusInterval -v 1
system sh/cfg.sh -n dnode4 -c statusInterval -v 1
system sh/cfg.sh -n dnode5 -c statusInterval -v 1
system sh/cfg.sh -n dnode6 -c statusInterval -v 1
system sh/cfg.sh -n dnode7 -c statusInterval -v 1
system sh/cfg.sh -n dnode8 -c statusInterval -v 1
system sh/cfg.sh -n dnode1 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode2 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode3 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode4 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode5 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode6 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode7 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode8 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode1 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode2 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode5 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode6 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode7 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode8 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode1 -c commitLog -v 0
system sh/cfg.sh -n dnode2 -c commitLog -v 0
system sh/cfg.sh -n dnode3 -c commitLog -v 0
system sh/cfg.sh -n dnode4 -c commitLog -v 0
system sh/cfg.sh -n dnode5 -c commitLog -v 0
system sh/cfg.sh -n dnode6 -c commitLog -v 0
system sh/cfg.sh -n dnode7 -c commitLog -v 0
system sh/cfg.sh -n dnode8 -c commitLog -v 0
system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 0
system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 0
system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 0
system sh/cfg.sh -n dnode4 -c mgmtEqualVnodeNum -v 0
system sh/cfg.sh -n dnode5 -c mgmtEqualVnodeNum -v 0
system sh/cfg.sh -n dnode6 -c mgmtEqualVnodeNum -v 0
system sh/cfg.sh -n dnode7 -c mgmtEqualVnodeNum -v 0
system sh/cfg.sh -n dnode8 -c mgmtEqualVnodeNum -v 0
print ============== step1
print ========= start dnode1
system sh/exec.sh -n dnode1 -s start
$x = 0
connectTbase:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql connect -x connectTbase
sql create dnode $hostname2
sql create dnode $hostname3
sql create dnode $hostname4
sql create dnode $hostname5
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode4 -s start
system sh/exec.sh -n dnode5 -s start
sleep 4001
$x = 0
created1:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql create database c_b5_d1 replica 5 -x created1
sql use c_b5_d1
$x = 0
create1:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql create table c_b5_t1 (t timestamp, i int) -x create1
sql insert into c_b5_t1 values(now+1s, 15)
sql insert into c_b5_t1 values(now+2s, 14)
sql insert into c_b5_t1 values(now+2s, 13)
sql insert into c_b5_t1 values(now+3s, 12)
sql insert into c_b5_t1 values(now+4s, 11)
sql create database c_b5_d2 replica 5
sql use c_b5_d2
$x = 0
create2:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql create table c_b5_t2 (t timestamp, i int) -x create2
sql insert into c_b5_t2 values(now+1s, 25)
sql insert into c_b5_t2 values(now+2s, 24)
sql insert into c_b5_t2 values(now+3s, 23)
sql insert into c_b5_t2 values(now+4s, 22)
sql insert into c_b5_t2 values(now+5s, 21)
show1:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql show dnodes -x show1
$dnode1Vnodes = $data3_192.168.0.1
print dnode1 $dnode1Vnodes
$dnode2Vnodes = $data3_192.168.0.2
print dnode2 $dnode2Vnodes
$dnode3Vnodes = $data3_192.168.0.3
print dnode3 $dnode3Vnodes
$dnode4Vnodes = $data3_192.168.0.4
print dnode4 $dnode4Vnodes
$dnode5Vnodes = $data3_192.168.0.5
print dnode5 $dnode5Vnodes
if $dnode1Vnodes != 2 then
goto show1
endi
if $dnode2Vnodes != 2 then
goto show1
endi
if $dnode3Vnodes != 2 then
goto show1
endi
if $dnode4Vnodes != 2 then
goto show1
endi
if $dnode5Vnodes != 2 then
goto show1
endi
print ============================== step2
print ========= start dnode6
sql create dnode $hostname6
system sh/exec.sh -n dnode6 -s start
sql create database c_b5_d3 replica 5
sql use c_b5_d3
$x = 0
create3:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql create table c_b5_t3 (t timestamp, i int) -x create3
sql insert into c_b5_t3 values(now+1s, 35)
sql insert into c_b5_t3 values(now+2s, 34)
sql insert into c_b5_t3 values(now+3s, 33)
sql insert into c_b5_t3 values(now+4s, 32)
sql insert into c_b5_t3 values(now+5s, 31)
sleep 10000
show2:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql show dnodes -x show2
$dnode1Status = $data4_192.168.0.1
print dnode1 $dnode1Status
$dnode2Status = $data4_192.168.0.2
print dnode2 $dnode2Status
$dnode3Status = $data4_192.168.0.3
print dnode3 $dnode3Status
$dnode4Status = $data4_192.168.0.4
print dnode4 $dnode4Status
$dnode5Status = $data4_192.168.0.5
print dnode5 $dnode5Status
$dnode6Status = $data4_192.168.0.6
print dnode6 $dnode6Status
if $dnode1Status != online then
goto show2
endi
if $dnode2Status != online then
goto show2
endi
if $dnode3Status != online then
goto show2
endi
if $dnode4Status != online then
goto show2
endi
if $dnode5Status != online then
goto show2
endi
if $dnode6Status != online then
goto show2
endi
print ============================== step3
print ========= drop dnode1
system sh/exec.sh -n dnode1 -s stop
print stop dnode1 and sleep 10000
sleep 10000
sql drop dnode $hostname1
print drop dnode1 and sleep 9000
sleep 9000
show3:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql show dnodes -x show3
$dnode1Vnodes = $data3_192.168.0.1
print dnode1 $dnode1Vnodes
$dnode2Vnodes = $data3_192.168.0.2
print dnode2 $dnode2Vnodes
$dnode3Vnodes = $data3_192.168.0.3
print dnode3 $dnode3Vnodes
$dnode4Vnodes = $data3_192.168.0.4
print dnode4 $dnode4Vnodes
$dnode5Vnodes = $data3_192.168.0.5
print dnode5 $dnode5Vnodes
$dnode6Vnodes = $data3_192.168.0.6
print dnode6 $dnode6Vnodes
if $dnode1Vnodes != null then
goto show3
endi
if $dnode2Vnodes != 1 then
goto show3
endi
if $dnode3Vnodes != 1 then
goto show3
endi
if $dnode4Vnodes != 1 then
goto show3
endi
if $dnode5Vnodes != 1 then
goto show3
endi
if $dnode6Vnodes != 1 then
goto show3
endi
print ============================== step4
print ========= add db, start dnode7
sql create database c_b5_d4 replica 5
sql use c_b5_d4
$x = 0
create4:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql create table c_b5_t4 (t timestamp, i int) -x create4
$x = 0
insert4:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql insert into c_b5_t4 values(now+1s, 45) -x insert4
sql insert into c_b5_t4 values(now+2s, 44)
sql insert into c_b5_t4 values(now+3s, 43)
sql insert into c_b5_t4 values(now+4s, 42)
sql insert into c_b5_t4 values(now+5s, 41)
sql create dnode $hostname1
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql create dnode $hostname7
system sh/exec.sh -n dnode7 -s start
sql create dnode $hostname8
system sh/exec.sh -n dnode8 -s start
sleep 9000
print ============================== step5
print ========= check data
sql use c_b5_d1
sql select * from c_b5_t1
print $data01 $data11 $data21 $data31 $data41
if $data01 != 11 then
return -1
endi
if $data11 != 12 then
return -1
endi
if $data21 != 13 then
return -1
endi
if $data31 != 14 then
return -1
endi
if $data41 != 15 then
return -1
endi
sql use c_b5_d2
sql select * from c_b5_t2
print $data01 $data11 $data21 $data31 $data41
if $data01 != 21 then
return -1
endi
if $data11 != 22 then
return -1
endi
if $data21 != 23 then
return -1
endi
if $data31 != 24 then
return -1
endi
if $data41 != 25 then
return -1
endi
sql use c_b5_d3
sql select * from c_b5_t3
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
sql use c_b5_d4
sql select * from c_b5_t4
print $data01 $data11 $data21 $data31 $data41
if $data01 != 41 then
return -1
endi
if $data11 != 42 then
return -1
endi
if $data21 != 43 then
return -1
endi
if $data31 != 44 then
return -1
endi
if $data41 != 45 then
return -1
endi
print ============================================ over
system sh/exec.sh -n dnode1 -s stop
system sh/exec.sh -n dnode2 -s stop
system sh/exec.sh -n dnode3 -s stop
system sh/exec.sh -n dnode4 -s stop
system sh/exec.sh -n dnode5 -s stop
system sh/exec.sh -n dnode6 -s stop
system sh/exec.sh -n dnode7 -s stop
system sh/exec.sh -n dnode8 -s stop
tests/script/unique/cluster/backup/balancex.sim
已删除
100644 → 0
浏览文件 @
2f011a42
sleep 1000
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
system sh/deploy.sh -n dnode5 -i 5
system sh/deploy.sh -n dnode6 -i 6
system sh/deploy.sh -n dnode7 -i 7
system sh/deploy.sh -n dnode8 -i 8
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode5 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode6 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode7 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode8 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c statusInterval -v 1
system sh/cfg.sh -n dnode2 -c statusInterval -v 1
system sh/cfg.sh -n dnode3 -c statusInterval -v 1
system sh/cfg.sh -n dnode4 -c statusInterval -v 1
system sh/cfg.sh -n dnode5 -c statusInterval -v 1
system sh/cfg.sh -n dnode6 -c statusInterval -v 1
system sh/cfg.sh -n dnode7 -c statusInterval -v 1
system sh/cfg.sh -n dnode8 -c statusInterval -v 1
system sh/cfg.sh -n dnode1 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode2 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode3 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode4 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode5 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode6 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode7 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode8 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode1 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode2 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode5 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode6 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode7 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode8 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode1 -c commitLog -v 1
system sh/cfg.sh -n dnode2 -c commitLog -v 1
system sh/cfg.sh -n dnode3 -c commitLog -v 1
system sh/cfg.sh -n dnode4 -c commitLog -v 1
system sh/cfg.sh -n dnode5 -c commitLog -v 1
system sh/cfg.sh -n dnode6 -c commitLog -v 1
system sh/cfg.sh -n dnode7 -c commitLog -v 1
system sh/cfg.sh -n dnode8 -c commitLog -v 1
system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 0
system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 0
system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 0
system sh/cfg.sh -n dnode4 -c mgmtEqualVnodeNum -v 0
system sh/cfg.sh -n dnode5 -c mgmtEqualVnodeNum -v 0
system sh/cfg.sh -n dnode6 -c mgmtEqualVnodeNum -v 0
system sh/cfg.sh -n dnode7 -c mgmtEqualVnodeNum -v 0
system sh/cfg.sh -n dnode8 -c mgmtEqualVnodeNum -v 0
print ============== step1
print ========= start dnode1
system sh/exec.sh -n dnode1 -s start
$x = 0
connectTbase:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql connect -x connectTbase
sql create dnode $hostname2
sql create dnode $hostname3
sql create dnode $hostname4
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode4 -s start
sleep 4001
sql connect
$x = 0
created1:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql create database c_bx_d1 replica 4 -x created1
sql use c_bx_d1
$x = 0
create1:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql create table c_bx_t1 (t timestamp, i int) -x create1
sql insert into c_bx_t1 values(now+1s, 15)
sql insert into c_bx_t1 values(now+2s, 14)
sql insert into c_bx_t1 values(now+2s, 13)
sql insert into c_bx_t1 values(now+3s, 12)
sql insert into c_bx_t1 values(now+4s, 11)
sql create database c_bx_d2 replica 4
sql use c_bx_d2
$x = 0
create2:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql create table c_bx_t2 (t timestamp, i int) -x create2
sql insert into c_bx_t2 values(now+1s, 25)
sql insert into c_bx_t2 values(now+2s, 24)
sql insert into c_bx_t2 values(now+3s, 23)
sql insert into c_bx_t2 values(now+4s, 22)
sql insert into c_bx_t2 values(now+5s, 21)
show1:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql show dnodes -x show1
$dnode1Vnodes = $data3_192.168.0.1
print dnode1 $dnode1Vnodes
$dnode2Vnodes = $data3_192.168.0.2
print dnode2 $dnode2Vnodes
$dnode3Vnodes = $data3_192.168.0.3
print dnode3 $dnode3Vnodes
$dnode4Vnodes = $data3_192.168.0.4
print dnode4 $dnode4Vnodes
if $dnode1Vnodes != 2 then
goto show1
endi
if $dnode2Vnodes != 2 then
goto show1
endi
if $dnode3Vnodes != 2 then
goto show1
endi
if $dnode4Vnodes != 2 then
goto show1
endi
print ============================== step2
print ========= start dnode6
sql create database c_bx_d3 replica 4
sql use c_bx_d3
$x = 0
create3:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql create table c_bx_t3 (t timestamp, i int) -x create3
sql insert into c_bx_t3 values(now+1s, 35)
sql insert into c_bx_t3 values(now+2s, 34)
sql insert into c_bx_t3 values(now+3s, 33)
sql insert into c_bx_t3 values(now+4s, 32)
sql insert into c_bx_t3 values(now+5s, 31)
sql create dnode $hostname5
system sh/exec.sh -n dnode5 -s start
sleep 9000
show2:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql show dnodes -x show2
$dnode1Vnodes = $data3_192.168.0.1
print dnode1 $dnode1Vnodes
$dnode2Vnodes = $data3_192.168.0.2
print dnode2 $dnode2Vnodes
$dnode3Vnodes = $data3_192.168.0.3
print dnode3 $dnode3Vnodes
$dnode4Vnodes = $data3_192.168.0.4
print dnode4 $dnode4Vnodes
$dnode5Vnodes = $data3_192.168.0.5
print dnode5 $dnode5Vnodes
$dnode6Vnodes = $data3_192.168.0.6
print dnode6 $dnode6Vnodes
if $dnode5Vnodes != 2 then
goto show2
endi
print ============================== step3
print ========= drop dnode1
system sh/exec.sh -n dnode1 -s stop -x SIGINT
print stop dnode1 and sleep 10000
sleep 10000
sql drop dnode $hostname1
print drop dnode1 and sleep 9000
sleep 9000
show3:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql show dnodes -x show3
$dnode1Vnodes = $data3_192.168.0.1
print dnode1 $dnode1Vnodes
$dnode2Vnodes = $data3_192.168.0.2
print dnode2 $dnode2Vnodes
$dnode3Vnodes = $data3_192.168.0.3
print dnode3 $dnode3Vnodes
$dnode4Vnodes = $data3_192.168.0.4
print dnode4 $dnode4Vnodes
$dnode5Vnodes = $data3_192.168.0.5
print dnode5 $dnode5Vnodes
$dnode6Vnodes = $data3_192.168.0.6
print dnode6 $dnode6Vnodes
if $dnode1Vnodes != null then
goto show3
endi
if $dnode2Vnodes != 1 then
goto show3
endi
if $dnode3Vnodes != 1 then
goto show3
endi
if $dnode4Vnodes != 1 then
goto show3
endi
if $dnode5Vnodes != 1 then
goto show3
endi
print ============================== step4
print ========= add db, start dnode7
sql create database c_bx_d4 replica 4
sql use c_bx_d4
$x = 0
create4:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql create table c_bx_t4 (t timestamp, i int) -x create4
sql insert into c_bx_t4 values(now+1s, 45)
sql insert into c_bx_t4 values(now+2s, 44)
sql insert into c_bx_t4 values(now+3s, 43)
sql insert into c_bx_t4 values(now+4s, 42)
sql insert into c_bx_t4 values(now+5s, 41)
print ============================== step5
print ========= check data
sql use c_bx_d1
sql select * from c_bx_d1
print $data01 $data11 $data21 $data31 $data41
if $data01 != 11 then
return -1
endi
if $data11 != 12 then
return -1
endi
if $data21 != 13 then
return -1
endi
if $data31 != 14 then
return -1
endi
if $data41 != 15 then
return -1
endi
sql use c_bx_d2
sql select * from c_bx_d2
print $data01 $data11 $data21 $data31 $data41
if $data01 != 21 then
return -1
endi
if $data11 != 22 then
return -1
endi
if $data21 != 23 then
return -1
endi
if $data31 != 24 then
return -1
endi
if $data41 != 25 then
return -1
endi
sql use c_bx_d3
sql select * from c_bx_d3
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
sql use c_bx_d4
sql select * from c_bx_d4
print $data01 $data11 $data21 $data31 $data41
if $data01 != 41 then
return -1
endi
if $data11 != 42 then
return -1
endi
if $data21 != 43 then
return -1
endi
if $data31 != 44 then
return -1
endi
if $data41 != 45 then
return -1
endi
print ============================================ over
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
tests/script/unique/cluster/testSuite.sim
浏览文件 @
099ffbd0
run unique/unique/balance1.sim
run unique/unique/balance2.sim
run unique/unique/balance3.sim
run unique/unique/balance1_bug.sim
run unique/unique/balance1_single.sim
\ No newline at end of file
#run unique/unique/balance1.sim
#run unique/unique/balance2.sim
#run unique/unique/balance3.sim
#run unique/unique/balance1_bug.sim
#run unique/unique/balance1_single.sim
\ No newline at end of file
tests/script/unique/column/testSuite.sim
浏览文件 @
099ffbd0
run unique/column/replica3.sim
#
run unique/column/replica3.sim
tests/script/unique/db/replica_add13.sim
浏览文件 @
099ffbd0
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3
...
...
@@ -93,24 +89,24 @@ show3:
endi
sql show dnodes
print dnode1 ==> openVnodes: $data
3
_1
print dnode2 ==> openVnodes: $data
3
_2
print dnode3 ==> openVnodes: $data
3
_3
print dnode4 ==> openVnodes: $data
3
_4
print dnode1 ==> openVnodes: $data
2
_1
print dnode2 ==> openVnodes: $data
2
_2
print dnode3 ==> openVnodes: $data
2
_3
print dnode4 ==> openVnodes: $data
2
_4
if $data
3
_1 != 0 then
if $data
2
_1 != 0 then
return -1
endi
if $data
3
_2 != 4 then
if $data
2
_2 != 4 then
return -1
endi
if $data
3
_3 != 4 then
if $data
2
_3 != 4 then
return -1
endi
if $data
3
_3 != 4 then
if $data
2
_3 != 4 then
return -1
endi
...
...
tests/script/unique/db/replica_add23.sim
浏览文件 @
099ffbd0
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3
...
...
@@ -93,24 +89,24 @@ show3:
endi
sql show dnodes
print dnode1 ==> openVnodes: $data
3
_1
print dnode2 ==> openVnodes: $data
3
_2
print dnode3 ==> openVnodes: $data
3
_3
print dnode4 ==> openVnodes: $data
3
_4
print dnode1 ==> openVnodes: $data
2
_1
print dnode2 ==> openVnodes: $data
2
_2
print dnode3 ==> openVnodes: $data
2
_3
print dnode4 ==> openVnodes: $data
2
_4
if $data
3
_1 != 0 then
if $data
2
_1 != 0 then
return -1
endi
if $data
3
_2 != 4 then
if $data
2
_2 != 4 then
return -1
endi
if $data
3
_3 != 4 then
if $data
2
_3 != 4 then
return -1
endi
if $data
3
_3 != 4 then
if $data
2
_3 != 4 then
return -1
endi
...
...
tests/script/unique/db/replica_part.sim
浏览文件 @
099ffbd0
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3
...
...
tests/script/unique/db/replica_reduce21.sim
浏览文件 @
099ffbd0
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3
...
...
tests/script/unique/db/replica_reduce31.sim
浏览文件 @
099ffbd0
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3
...
...
tests/script/unique/db/replica_reduce32.sim
浏览文件 @
099ffbd0
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3
...
...
@@ -97,34 +95,26 @@ if $rows != 2 then
return -1
endi
sql reset query cache
sleep 1000
print ========= step4
system sh/exec_up.sh -n dnode2 -s stop -x SIGINT
sleep 5000
sql insert into d1.t1 values(now, 3)
sql insert into d2.t2 values(now, 3)
sql insert into d3.t3 values(now, 3)
sql insert into d4.t4 values(now, 3)
sql insert into d1.t1 values(now, 3) -x step1
step1:
sql insert into d2.t2 values(now, 3) -x step2
step2:
sql insert into d3.t3 values(now, 3) -x step3
step3:
sql insert into d4.t4 values(now, 3) -x step4
step4:
sql select * from d1.t1
if $rows != 3 then
return -1
endi
sql select * from d2.t2
if $rows != 3 then
return -1
endi
sql select * from d3.t3
if $rows != 3 then
return -1
endi
sql select * from d4.t4
if $rows != 3 then
return -1
endi
print ========= step5
system sh/exec_up.sh -n dnode2 -s start
...
...
@@ -136,16 +126,18 @@ sleep 5000
sql reset query cache
sleep 1000
sql_error insert into d1.t1 values(now, 4)
sql_error insert into d2.t2 values(now, 4)
sql_error insert into d3.t3 values(now, 4)
sql_error insert into d4.t4 values(now, 4)
sql insert into d1.t1 values(now, 3) -x step11
step11:
sql insert into d2.t2 values(now, 3) -x step21
step21:
sql insert into d3.t3 values(now, 3) -x step31
step31:
sql insert into d4.t4 values(now, 3) -x step41
step41:
print ========= step6
system sh/exec_up.sh -n dnode3 -s start
sleep 5000
system sh/exec_up.sh -n dnode2 -s stop -x SIGINT
sleep 3000
sql insert into d1.t1 values(now, 5)
sql insert into d2.t2 values(now, 5)
...
...
@@ -153,21 +145,13 @@ sql insert into d3.t3 values(now, 5)
sql insert into d4.t4 values(now, 5)
sql select * from d1.t1
if $rows != 4 then
return -1
endi
print d1.t1 $rows
sql select * from d2.t2
if $rows != 4 then
return -1
endi
print d2.t2 $rows
sql select * from d3.t3
if $rows != 4 then
return -1
endi
print d3.t3 $rows
sql select * from d4.t4
if $rows != 4 then
return -1
endi
print d4.t4 $rows
tests/script/unique/mnode/mgmt33.sim
浏览文件 @
099ffbd0
...
...
@@ -8,7 +8,7 @@ system sh/cfg.sh -n dnode2 -c numOfMPeers -v 3
system sh/cfg.sh -n dnode3 -c numOfMPeers -v 3
print ============== step1
system sh/exec_up.sh -n dnode1 -s start
-t
system sh/exec_up.sh -n dnode1 -s start
sql connect
sql show mnodes
...
...
@@ -26,7 +26,7 @@ if $data3_3 != null then
endi
print ============== step2
system sh/exec_up.sh -n dnode2 -s start
-t
system sh/exec_up.sh -n dnode2 -s start
sql create dnode $hostname2
sleep 8000
...
...
@@ -49,7 +49,7 @@ if $dnode3Role != null then
endi
print ============== step3
system sh/exec_up.sh -n dnode3 -s start
-t
system sh/exec_up.sh -n dnode3 -s start
sql create dnode $hostname3
sleep 8000
...
...
@@ -98,7 +98,7 @@ sleep 3000
system sh/deploy.sh -n dnode2 -i 2
system sh/cfg.sh -n dnode2 -c numOfMPeers -v 3
system sh/exec_up.sh -n dnode2 -s start
-t
system sh/exec_up.sh -n dnode2 -s start
print ============== step5
sql create dnode $hostname2
...
...
tests/script/unique/mnode/mgmt34.sim
浏览文件 @
099ffbd0
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3
...
...
@@ -204,7 +199,7 @@ sleep 8000
sql show mnodes
$dnode1Role = $data2_1
$dnode2Role = $data
3
_5
$dnode2Role = $data
2
_5
$dnode3Role = $data2_3
$dnode4Role = $data2_4
print dnode1 ==> $dnode1Role
...
...
tests/script/unique/mnode/testSuite.sim
浏览文件 @
099ffbd0
...
...
@@ -5,5 +5,5 @@ run unique/mnode/mgmt25.sim
run unique/mnode/mgmt26.sim
run unique/mnode/mgmt33.sim
run unique/mnode/mgmt34.sim
run unique/mnode/mgmtr2.sim
run unique/mnode/secondIp.sim
#
run unique/mnode/mgmtr2.sim
#
run unique/mnode/secondIp.sim
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录