Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
王长生-AnH
TDengine
提交
1b3dbaf1
T
TDengine
项目概览
王长生-AnH
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
5
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1b3dbaf1
编写于
12月 24, 2020
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
scripts
上级
290667dd
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
76 addition
and
101 deletion
+76
-101
tests/script/unique/arbitrator/dn3_mn1_replica_change.sim
tests/script/unique/arbitrator/dn3_mn1_replica_change.sim
+76
-101
未找到文件。
tests/script/unique/arbitrator/dn3_mn1_replica_change.sim
浏览文件 @
1b3dbaf1
...
@@ -70,8 +70,6 @@ if $data4_2 != ready then
...
@@ -70,8 +70,6 @@ if $data4_2 != ready then
goto step1
goto step1
endi
endi
$sleepTimer = 10000
$db = db
$db = db
sql create database $db replica 1
sql create database $db replica 1
sql use $db
sql use $db
...
@@ -101,7 +99,6 @@ while $i < $tblNum
...
@@ -101,7 +99,6 @@ while $i < $tblNum
endw
endw
sql select count(*) from $stb
sql select count(*) from $stb
sleep 1000
print data00 $data00
print data00 $data00
if $data00 != $totalRows then
if $data00 != $totalRows then
return -1
return -1
...
@@ -109,8 +106,6 @@ endi
...
@@ -109,8 +106,6 @@ endi
print ============== step2-1: stop dnode2 for falling disc, then restart dnode2, and check rows
print ============== step2-1: stop dnode2 for falling disc, then restart dnode2, and check rows
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
sleep $sleepTimer
$loopCnt = 0
$loopCnt = 0
wait_dnode2_offline_0:
wait_dnode2_offline_0:
...
@@ -141,8 +136,6 @@ if $dnode2Status != offline then
...
@@ -141,8 +136,6 @@ if $dnode2Status != offline then
endi
endi
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode2 -s start
sleep $sleepTimer
$loopCnt = 0
$loopCnt = 0
wait_dnode2_reready:
wait_dnode2_reready:
...
@@ -200,41 +193,21 @@ if $data4_3 != ready then
...
@@ -200,41 +193,21 @@ if $data4_3 != ready then
endi
endi
sql alter database $db replica 2
sql alter database $db replica 2
sleep $sleepTimer
$loopCnt = 0
wait_dnode3_ready:
$loopCnt = $loopCnt + 1
if $loopCnt == 20 then
return -1
endi
sql show dnodes
$x = 0
if $rows != 3 then
a1:
sleep 2000
$x = $x + 1
goto wait_dnode3_ready
sleep 1000
endi
if $x == 40 then
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
return -1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
endi
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
#$dnode1Status = $data4_1
$dnode2Status = $data4_2
$dnode3Status = $data4_3
#$dnode4Status = $data4_4
#$dnode5Status = $data4_5
if $dnode2Status != ready then
sql show vgroups
sleep 2000
print online vnodes $data03
goto wait_dnode3_ready
if $data03 != 2 then
endi
goto a1
if $dnode3Status != ready then
sleep 2000
goto wait_dnode3_ready
endi
endi
sleep $sleepTimer
# check using select
# check using select
sql select count(*) from $stb
sql select count(*) from $stb
print data00 $data00
print data00 $data00
...
@@ -242,10 +215,8 @@ if $data00 != $totalRows then
...
@@ -242,10 +215,8 @@ if $data00 != $totalRows then
return -1
return -1
endi
endi
print ============== step4: stop dnode2 for checking if sync ok
print ============== step4: stop dnode2 for checking if sync ok
system sh/exec.sh -n dnode2 -s stop
system sh/exec.sh -n dnode2 -s stop
sleep $sleepTimer
$loopCnt = 0
$loopCnt = 0
wait_dnode2_offline:
wait_dnode2_offline:
$loopCnt = $loopCnt + 1
$loopCnt = $loopCnt + 1
...
@@ -279,7 +250,6 @@ if $dnode3Status != ready then
...
@@ -279,7 +250,6 @@ if $dnode3Status != ready then
goto wait_dnode2_offline
goto wait_dnode2_offline
endi
endi
sleep $sleepTimer # waitting for move master vnode of dnode2 to dnode3
# check using select
# check using select
sql select count(*) from $stb
sql select count(*) from $stb
print data00 $data00
print data00 $data00
...
@@ -289,37 +259,20 @@ endi
...
@@ -289,37 +259,20 @@ endi
print ============== step5: restart dnode2
print ============== step5: restart dnode2
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode2 -s start
$x = 0
a2:
$x = $x + 1
sleep 1000
if $x == 40 then
return -1
endi
$loopCnt = 0
sql show vgroups
wait_dnode2_ready:
print online vnodes $data03
$loopCnt = $loopCnt + 1
if $data03 != 2 then
if $loopCnt == 10 then
goto a2
return -1
endi
sql show dnodes
if $rows != 3 then
sleep 2000
goto wait_dnode2_ready
endi
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
#$dnode1Status = $data4_1
$dnode2Status = $data4_2
$dnode3Status = $data4_3
#$dnode4Status = $data4_4
#$dnode5Status = $data4_5
if $dnode2Status != ready then
sleep 2000
goto wait_dnode2_ready
endi
endi
sleep $sleepTimer
# check using select
# check using select
sql select count(*) from $stb
sql select count(*) from $stb
print data00 $data00
print data00 $data00
...
@@ -349,37 +302,20 @@ if $data4_4 != ready then
...
@@ -349,37 +302,20 @@ if $data4_4 != ready then
endi
endi
sql alter database $db replica 3
sql alter database $db replica 3
sleep $sleepTimer
$x = 0
$loopCnt = 0
a3:
wait_dnode4_ready:
$x = $x + 1
$loopCnt = $loopCnt + 1
sleep 1000
if $loopCnt == 10 then
if $x == 40 then
return -1
return -1
endi
endi
sql show dnodes
if $rows != 4 then
sleep 2000
goto wait_dnode4_ready
endi
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
#$dnode1Status = $data4_1
#$dnode2Status = $data4_2
$dnode3Status = $data4_3
$dnode4Status = $data4_4
#$dnode5Status = $data4_5
if $dnode4Status != ready then
sql show vgroups
sleep 2000
print online vnodes $data03
goto wait_dnode4_ready
if $data03 != 3 then
goto a3
endi
endi
sleep $sleepTimer
# check using select
# check using select
sql select count(*) from $stb
sql select count(*) from $stb
print data00 $data00
print data00 $data00
...
@@ -389,7 +325,6 @@ endi
...
@@ -389,7 +325,6 @@ endi
print ============== step7: alter replica from 3 to 2, and waiting sync
print ============== step7: alter replica from 3 to 2, and waiting sync
sql alter database $db replica 2
sql alter database $db replica 2
sleep $sleepTimer
$loopCnt = 0
$loopCnt = 0
wait_vgroups_replic_to_2:
wait_vgroups_replic_to_2:
$loopCnt = $loopCnt + 1
$loopCnt = $loopCnt + 1
...
@@ -426,7 +361,20 @@ if $thirdDnode_5 != null then
...
@@ -426,7 +361,20 @@ if $thirdDnode_5 != null then
goto wait_vgroups_replic_to_2
goto wait_vgroups_replic_to_2
endi
endi
sleep $sleepTimer #waiting del one replica data
$x = 0
a4:
$x = $x + 1
sleep 1000
if $x == 40 then
return -1
endi
sql show vgroups
print online vnodes $data03
if $data03 != 2 then
goto a4
endi
# check using select
# check using select
sql select count(*) from $stb
sql select count(*) from $stb
print data00 $data00
print data00 $data00
...
@@ -436,7 +384,7 @@ endi
...
@@ -436,7 +384,7 @@ endi
print ============== step8: alter replica from 2 to 1, and waiting sync
print ============== step8: alter replica from 2 to 1, and waiting sync
sql alter database $db replica 1
sql alter database $db replica 1
sleep
$sleepTimer
sleep
10000
$loopCnt = 0
$loopCnt = 0
wait_vgroups_replic_to_1:
wait_vgroups_replic_to_1:
$loopCnt = $loopCnt + 1
$loopCnt = $loopCnt + 1
...
@@ -514,7 +462,20 @@ if $dnode4Status != ready then
...
@@ -514,7 +462,20 @@ if $dnode4Status != ready then
goto all_dnodes_ready
goto all_dnodes_ready
endi
endi
sleep $sleepTimer #waiting del one replica data
$x = 0
a5:
$x = $x + 1
sleep 1000
if $x == 40 then
return -1
endi
sql show vgroups
print online vnodes $data03
if $data03 != 1 then
goto a5
endi
# check using select
# check using select
sql select count(*) from $stb
sql select count(*) from $stb
print data00 $data00
print data00 $data00
...
@@ -562,6 +523,20 @@ if $dnode4Status != ready then
...
@@ -562,6 +523,20 @@ if $dnode4Status != ready then
return -1
return -1
endi
endi
$x = 0
a6:
$x = $x + 1
sleep 1000
if $x == 40 then
return -1
endi
sql show vgroups
print online vnodes $data03
if $data03 != 1 then
goto a6
endi
sleep $sleepTimer #waiting move vnode from dnode3/dnode3 to dnode4
sleep $sleepTimer #waiting move vnode from dnode3/dnode3 to dnode4
# check using select
# check using select
sql select count(*) from $stb
sql select count(*) from $stb
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录