Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
a531f81b
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
a531f81b
编写于
7月 13, 2020
作者:
H
Hui Li
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[temp not test drop dnode]
上级
e51ea2d3
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
78 addition
and
53 deletion
+78
-53
tests/script/unique/cluster/cluster_main.sim
tests/script/unique/cluster/cluster_main.sim
+44
-25
tests/script/unique/cluster/cluster_main1.sim
tests/script/unique/cluster/cluster_main1.sim
+17
-14
tests/script/unique/cluster/cluster_main2.sim
tests/script/unique/cluster/cluster_main2.sim
+17
-14
未找到文件。
tests/script/unique/cluster/cluster_main.sim
浏览文件 @
a531f81b
...
@@ -71,7 +71,7 @@ print ============== step3: create stable stb1
...
@@ -71,7 +71,7 @@ print ============== step3: create stable stb1
$stb = stb1
$stb = stb1
sql create table $stb (ts timestamp, c1 int) tags(t1 int, t2 binary(8))
sql create table $stb (ts timestamp, c1 int) tags(t1 int, t2 binary(8))
print ============== step4: start
10 client1/ 10 client2/ 10 client3/ 10 client4/ 1 client5
print ============== step4: start
back client1_0.sim
run_back unique/cluster/client1_0.sim
run_back unique/cluster/client1_0.sim
#run_back unique/cluster/client1_1.sim
#run_back unique/cluster/client1_1.sim
#run_back unique/cluster/client1_2.sim
#run_back unique/cluster/client1_2.sim
...
@@ -106,26 +106,26 @@ endi
...
@@ -106,26 +106,26 @@ endi
print wait for a while to let clients start insert data
print wait for a while to let clients start insert data
sleep 5000
sleep 5000
print ============== step4-1: add dnode4/dnode5 into cluster
sql create dnode $hostname4
sql create dnode $hostname5
$loop_cnt = 0
$loop_cnt = 0
loop_cluster_do:
loop_cluster_do:
print **** **** **** START loop cluster do (loop_cnt: $loop_cnt )**** **** **** ****
print **** **** **** START loop cluster do (loop_cnt: $loop_cnt )**** **** **** ****
print ============== step5: start dnode4/dnode5
and add into cluster, then wait ready
print ============== step5: start dnode4/dnode5
system sh/exec.sh -n dnode4 -s start
system sh/exec.sh -n dnode4 -s start
system sh/exec.sh -n dnode5 -s start
system sh/exec.sh -n dnode5 -s start
sql create dnode $hostname4
sleep 20000
sql create dnode $hostname5
sleep 5000
print ============== step6: stop
and drop dnode1, then remove data dir of dnode1
print ============== step6: stop
dnode1
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep
5
000
sleep
10
000
sql drop dnode $hostname1
#
sql drop dnode $hostname1
sleep 5000
#
sleep 5000
system rm -rf ../../../sim/dnode1/data
#
system rm -rf ../../../sim/dnode1/data
sleep 20000
#
sleep 20000
sql show mnodes
sql show mnodes
print show mnodes
print show mnodes
...
@@ -140,6 +140,22 @@ print $data0_7 $data1_7 $data2_7 $data3_7 $data4_7
...
@@ -140,6 +140,22 @@ print $data0_7 $data1_7 $data2_7 $data3_7 $data4_7
print $data0_8 $data1_8 $data2_8 $data3_8 $data4_8
print $data0_8 $data1_8 $data2_8 $data3_8 $data4_8
print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9
print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9
print ============== step6-1: restart dnode1
system sh/exec.sh -n dnode1 -s start
sleep 10000
sql show mnodes
print show mnodes
print rows: $rows
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3
print $data0_4 $data1_4 $data2_4 $data3_4 $data4_4
print $data0_5 $data1_5 $data2_5 $data3_5 $data4_5
print $data0_6 $data1_6 $data2_6 $data3_6 $data4_6
print $data0_7 $data1_7 $data2_7 $data3_7 $data4_7
print $data0_8 $data1_8 $data2_8 $data3_8 $data4_8
print $data0_9 $data1_9 $data2_9 $data3_9 $data4_9
print ============== step7: stop dnode2
print ============== step7: stop dnode2
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
sleep 5000
sleep 5000
...
@@ -235,14 +251,17 @@ if $data04 != 2 then
...
@@ -235,14 +251,17 @@ if $data04 != 2 then
return -1
return -1
endi
endi
print ============== step14: stop
and drop dnode4/dnode5, then remove data dir of dnode4/dnode5
print ============== step14: stop
dnode4/dnode5
system sh/exec.sh -n dnode4 -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 dnode5 -s stop -x SIGINT
sleep 20000
sleep 20000
sql drop dnode $hostname4
#system sh/exec.sh -n dnode4 -s start
sql drop dnode $hostname5
#system sh/exec.sh -n dnode5 -s start
system rm -rf ../../../sim/dnode4/data
#sleep 10000
system rm -rf ../../../sim/dnode5/data
#sql drop dnode $hostname4
#sql drop dnode $hostname5
#system rm -rf ../../../sim/dnode4/data
#system rm -rf ../../../sim/dnode5/data
print ============== step15: alter replica 1
print ============== step15: alter replica 1
sql alter database $db replica 1
sql alter database $db replica 1
...
@@ -262,13 +281,13 @@ if $data04 != 2 then
...
@@ -262,13 +281,13 @@ if $data04 != 2 then
return -1
return -1
endi
endi
print ============== step17: start dnode1 and add into cluster, then wait dnode1 ready
#
print ============== step17: start dnode1 and add into cluster, then wait dnode1 ready
system sh/cfg.sh -n dnode1 -c first -v $hostname2
#
system sh/cfg.sh -n dnode1 -c first -v $hostname2
system sh/cfg.sh -n dnode1 -c second -v $hostname3
#
system sh/cfg.sh -n dnode1 -c second -v $hostname3
#
system sh/exec.sh -n dnode1 -s start
#
system sh/exec.sh -n dnode1 -s start
sql create dnode $hostname1
#
sql create dnode $hostname1
sleep 20000
#
sleep 20000
print ============== step18: alter replica 3
print ============== step18: alter replica 3
sql alter database $db replica 3
sql alter database $db replica 3
...
...
tests/script/unique/cluster/cluster_main1.sim
浏览文件 @
a531f81b
...
@@ -104,15 +104,18 @@ endi
...
@@ -104,15 +104,18 @@ endi
print wait for a while to let clients start insert data
print wait for a while to let clients start insert data
sleep 5000
sleep 5000
print ============== step4-1: add dnode4/dnode5 into cluster
sql create dnode $hostname4
sql create dnode $hostname5
sleep 5000
$loop_cnt = 0
$loop_cnt = 0
loop_cluster_do:
loop_cluster_do:
print **** **** **** START loop cluster do (loop_cnt: $loop_cnt )**** **** **** ****
print **** **** **** START loop cluster do (loop_cnt: $loop_cnt )**** **** **** ****
print ============== step5: start dnode4/dnode5
and add into cluster, then wait ready
print ============== step5: start dnode4/dnode5
system sh/exec.sh -n dnode4 -s start
system sh/exec.sh -n dnode4 -s start
system sh/exec.sh -n dnode5 -s start
system sh/exec.sh -n dnode5 -s start
sql create dnode $hostname4
sleep 20000
sql create dnode $hostname5
sleep 5000
print ============== step6: stop dnode1
print ============== step6: stop dnode1
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
...
@@ -207,9 +210,9 @@ print ============== step11: stop dnode4, then wait sync end
...
@@ -207,9 +210,9 @@ print ============== step11: stop dnode4, then wait sync end
system sh/exec.sh -n dnode4 -s stop -x SIGINT
system sh/exec.sh -n dnode4 -s stop -x SIGINT
sleep 20000
sleep 20000
print ============== step12: restart dnode4, then wait sync end
#
print ============== step12: restart dnode4, then wait sync end
system sh/exec.sh -n dnode4 -s start
#
system sh/exec.sh -n dnode4 -s start
sleep 20000
#
sleep 20000
sql show mnodes
sql show mnodes
print show mnodes
print show mnodes
print rows: $rows
print rows: $rows
...
@@ -243,15 +246,15 @@ if $replica != 2 then
...
@@ -243,15 +246,15 @@ if $replica != 2 then
return -1
return -1
endi
endi
print ============== step14:
drop dnode4, then remove data dir
print ============== step14:
stop dnode5
s
ql drop dnode $hostname4
s
ystem sh/exec.sh -n dnode5 -s stop -x SIGINT
sleep 20000
sleep 20000
system rm -rf ../../../sim/dnode4
/data
#system rm -rf ../../../sim/dnode5
/data
print ============== step14-1: drop dnode5, then remove data dir
#
print ============== step14-1: drop dnode5, then remove data dir
sql drop dnode $hostname5
#
sql drop dnode $hostname5
sleep 20000
#
sleep 20000
system rm -rf ../../../sim/dnode5/data
#
system rm -rf ../../../sim/dnode5/data
print ============== step15: alter replica 1
print ============== step15: alter replica 1
sql alter database $db replica 1
sql alter database $db replica 1
...
...
tests/script/unique/cluster/cluster_main2.sim
浏览文件 @
a531f81b
...
@@ -108,15 +108,18 @@ endi
...
@@ -108,15 +108,18 @@ endi
print wait for a while to let clients start insert data
print wait for a while to let clients start insert data
sleep 5000
sleep 5000
print ============== step4-1: add dnode4/dnode5 into cluster
sql create dnode $hostname4
sql create dnode $hostname5
sleep 5000
$loop_cnt = 0
$loop_cnt = 0
loop_cluster_do:
loop_cluster_do:
print **** **** **** START loop cluster do (loop_cnt: $loop_cnt )**** **** **** ****
print **** **** **** START loop cluster do (loop_cnt: $loop_cnt )**** **** **** ****
print ============== step5: start dnode4/dnode5
and add into cluster, then wait ready
print ============== step5: start dnode4/dnode5
system sh/exec.sh -n dnode4 -s start
system sh/exec.sh -n dnode4 -s start
system sh/exec.sh -n dnode5 -s start
system sh/exec.sh -n dnode5 -s start
sql create dnode $hostname4
sql create dnode $hostname5
sleep 5000
print ============== step6: stop dnode1
print ============== step6: stop dnode1
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
...
@@ -211,9 +214,9 @@ print ============== step11: stop dnode4, then wait sync end
...
@@ -211,9 +214,9 @@ print ============== step11: stop dnode4, then wait sync end
system sh/exec.sh -n dnode4 -s stop -x SIGINT
system sh/exec.sh -n dnode4 -s stop -x SIGINT
sleep 20000
sleep 20000
print ============== step12: restart dnode4, then wait sync end
#
print ============== step12: restart dnode4, then wait sync end
system sh/exec.sh -n dnode4 -s start
#
system sh/exec.sh -n dnode4 -s start
sleep 20000
#
sleep 20000
sql show mnodes
sql show mnodes
print show mnodes
print show mnodes
print rows: $rows
print rows: $rows
...
@@ -247,15 +250,15 @@ if $replica != 2 then
...
@@ -247,15 +250,15 @@ if $replica != 2 then
return -1
return -1
endi
endi
print ============== step14: drop dnode
4
, then remove data dir
print ============== step14: drop dnode
5
, then remove data dir
s
ql drop dnode $hostname4
s
ystem sh/exec.sh -n dnode5 -s stop -x SIGINT
sleep 20000
sleep 20000
system rm -rf ../../../sim/dnode4
/data
#system rm -rf ../../../sim/dnode5
/data
print ============== step14-1: drop dnode5, then remove data dir
#
print ============== step14-1: drop dnode5, then remove data dir
sql drop dnode $hostname5
#
sql drop dnode $hostname5
sleep 20000
#
sleep 20000
system rm -rf ../../../sim/dnode5/data
#
system rm -rf ../../../sim/dnode5/data
print ============== step15: alter replica 1
print ============== step15: alter replica 1
sql alter database $db replica 1
sql alter database $db replica 1
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录