Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
6acc51db
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
提交
6acc51db
编写于
5月 17, 2022
作者:
haoranc
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify testcase of threeReplica
上级
2027f477
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
34 addition
and
36 deletion
+34
-36
tests/script/tsim/sync/threeReplica1VgElectWihtInsert.sim
tests/script/tsim/sync/threeReplica1VgElectWihtInsert.sim
+34
-36
未找到文件。
tests/script/tsim/sync/threeReplica1VgElectWihtInsert.sim
浏览文件 @
6acc51db
...
...
@@ -31,7 +31,7 @@ if $data[0][4] != ready then
goto check_dnode_ready
endi
#
sql connect
sql connect
sql create dnode $hostname port 7200
sql create dnode $hostname port 7300
sql create dnode $hostname port 7400
...
...
@@ -83,7 +83,7 @@ print $data(db)[13] $data(db)[14] $data(db)[15] $data(db)[16] $data(db)[17] $dat
if $rows != 3 then
return -1
endi
if $data(db)[19] !=
ready
then
if $data(db)[19] !=
nostrict
then
goto check_db_ready
endi
...
...
@@ -93,49 +93,48 @@ $loop_cnt = 0
check_vg_ready:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt ==
1
0 then
if $loop_cnt ==
4
0 then
print ====> vgroups not ready!
return -1
endi
sql show vgroups
print ===> rows: $rows
print $data(2)[0] $data(2)[1] $data(2)[2] $data(2)[3] $data(2)[4] $data(2)[5] $data(2)[6] $data(2)[7] $data(2)[8] $data(2)[9] $data(2)[10] $data(2)[11] $data(2)[12] $data(2)[13]
print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6] $data[0][7] $data[0][8] $data[0][9] $data[10][6] $data[0][11] $data[0][12] $data[0][13]
if $rows != $vgroups then
return -1
endi
if $data[0][4] == LEADER then
if $data[0][6] != F
LLOWER
then
if $data[0][6] != F
OLLOWER
then
goto check_vg_ready
endi
if $data[0][8] != FLLOWER then
if $data[0][8] != F
O
LLOWER then
goto check_vg_ready
endi
print ---- vgroup $data[0][0] leader locate on dnode $data[0][3]
goto vg_ready
endi
if $data[0][6] == LEADER then
if $data[0][4] != FLLOWER then
goto vg_ready
elif $data[0][6] == LEADER then
if $data[0][4] != FOLLOWER then
goto check_vg_ready
endi
if $data[0][8] != FLLOWER then
if $data[0][8] != F
O
LLOWER then
goto check_vg_ready
endi
print ---- vgroup $data[0][0] leader locate on dnode $data[0][5]
goto vg_ready
endi
if $data[0][8] == LEADER then
if $data[0][4] != FLLOWER then
goto vg_ready
elif $data[0][8] == LEADER then
if $data[0][4] != FOLLOWER then
goto check_vg_ready
endi
if $data[0][6] != FLLOWER then
if $data[0][6] != F
O
LLOWER then
goto check_vg_ready
endi
print ---- vgroup $data[0][0] leader locate on dnode $data[0][7]
goto vg_ready
goto vg_ready
else
goto check_vg_ready
endi
vg_ready:
vg_ready:
print ====> create stable/child table
sql create table stb (ts timestamp, c1 int, c2 float, c3 binary(10)) tags (t1 int)
...
...
@@ -185,7 +184,7 @@ print ====> create a normal table for interaction between main and back threads
sql create table interaction (ts timestamp, flag binary(10), childrows int, stbrows int)
print ====> start to run_back to insert data
run_back tsim/
tmq
/insertDataByRunBack.sim
run_back tsim/
sync
/insertDataByRunBack.sim
print ====> waiting insert thread starting insert data
...
...
@@ -239,34 +238,34 @@ if $rows != $vgroups then
return -1
endi
if $data[0][4] == LEADER then
if $data[0][6] != FLLOWER then
if $data[0][6] != F
O
LLOWER then
goto check_vg_ready_2
endi
if $data[0][8] != FLLOWER then
if $data[0][8] != F
O
LLOWER then
goto check_vg_ready_2
endi
print ---- vgroup $data[0][0] leader switch to dnode $data[0][3]
goto vg_ready_2
endi
if $data[0][6] == LEADER then
if $data[0][4] != FLLOWER then
elif $data[0][6] == LEADER then
if $data[0][4] != FOLLOWER then
goto check_vg_ready_2
endi
if $data[0][8] != FLLOWER then
if $data[0][8] != F
O
LLOWER then
goto check_vg_ready_2
endi
print ---- vgroup $data[0][0] leader switch to dnode $data[0][5]
goto vg_ready_2
endi
if $data[0][8] == LEADER then
if $data[0][4] != FLLOWER then
elif $data[0][8] == LEADER then
if $data[0][4] != FOLLOWER then
goto check_vg_ready_2
endi
if $data[0][6] != FLLOWER then
if $data[0][6] != F
O
LLOWER then
goto check_vg_ready_2
endi
print ---- vgroup $data[0][0] leader switch to dnode $data[0][7]
goto vg_ready_2
else
goto check_vg_ready_2
endi
vg_ready_2:
...
...
@@ -344,28 +343,28 @@ if $rows != $vgroups then
return -1
endi
if $data[0][4] == LEADER then
if $data[0][6] != FLLOWER then
if $data[0][6] != F
O
LLOWER then
goto check_vg_ready_1
endi
if $data[0][8] != FLLOWER then
if $data[0][8] != F
O
LLOWER then
goto check_vg_ready_1
endi
goto vg_ready_1
endi
if $data[0][6] == LEADER then
if $data[0][4] != FLLOWER then
if $data[0][4] != F
O
LLOWER then
goto check_vg_ready_1
endi
if $data[0][8] != FLLOWER then
if $data[0][8] != F
O
LLOWER then
goto check_vg_ready_1
endi
goto vg_ready_1
endi
if $data[0][8] == LEADER then
if $data[0][4] != FLLOWER then
if $data[0][4] != F
O
LLOWER then
goto check_vg_ready_1
endi
if $data[0][6] != FLLOWER then
if $data[0][6] != F
O
LLOWER then
goto check_vg_ready_1
endi
goto vg_ready_1
...
...
@@ -420,7 +419,6 @@ elif $data[0][6] == LEADER then
goto check_vg_ready_3
endi
print ---- vgroup $data[0][0] leader locating dnode $data[0][7]
endi
elif $data[0][8] == LEADER then
if $data[0][4] == LEADER then
goto check_vg_ready_3
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录