Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
6acc51db
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
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
...
@@ -31,7 +31,7 @@ if $data[0][4] != ready then
goto check_dnode_ready
goto check_dnode_ready
endi
endi
#
sql connect
sql connect
sql create dnode $hostname port 7200
sql create dnode $hostname port 7200
sql create dnode $hostname port 7300
sql create dnode $hostname port 7300
sql create dnode $hostname port 7400
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
...
@@ -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
if $rows != 3 then
return -1
return -1
endi
endi
if $data(db)[19] !=
ready
then
if $data(db)[19] !=
nostrict
then
goto check_db_ready
goto check_db_ready
endi
endi
...
@@ -93,49 +93,48 @@ $loop_cnt = 0
...
@@ -93,49 +93,48 @@ $loop_cnt = 0
check_vg_ready:
check_vg_ready:
$loop_cnt = $loop_cnt + 1
$loop_cnt = $loop_cnt + 1
sleep 200
sleep 200
if $loop_cnt ==
1
0 then
if $loop_cnt ==
4
0 then
print ====> vgroups not ready!
print ====> vgroups not ready!
return -1
return -1
endi
endi
sql show vgroups
sql show vgroups
print ===> rows: $rows
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]
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
if $rows != $vgroups then
return -1
return -1
endi
endi
if $data[0][4] == LEADER then
if $data[0][4] == LEADER then
if $data[0][6] != F
LLOWER
then
if $data[0][6] != F
OLLOWER
then
goto check_vg_ready
goto check_vg_ready
endi
endi
if $data[0][8] != FLLOWER then
if $data[0][8] != F
O
LLOWER then
goto check_vg_ready
goto check_vg_ready
endi
endi
print ---- vgroup $data[0][0] leader locate on dnode $data[0][3]
print ---- vgroup $data[0][0] leader locate on dnode $data[0][3]
goto vg_ready
goto vg_ready
endi
elif $data[0][6] == LEADER then
if $data[0][6] == LEADER then
if $data[0][4] != FOLLOWER then
if $data[0][4] != FLLOWER then
goto check_vg_ready
goto check_vg_ready
endi
endi
if $data[0][8] != FLLOWER then
if $data[0][8] != F
O
LLOWER then
goto check_vg_ready
goto check_vg_ready
endi
endi
print ---- vgroup $data[0][0] leader locate on dnode $data[0][5]
print ---- vgroup $data[0][0] leader locate on dnode $data[0][5]
goto vg_ready
goto vg_ready
endi
elif $data[0][8] == LEADER then
if $data[0][8] == LEADER then
if $data[0][4] != FOLLOWER then
if $data[0][4] != FLLOWER then
goto check_vg_ready
goto check_vg_ready
endi
endi
if $data[0][6] != FLLOWER then
if $data[0][6] != F
O
LLOWER then
goto check_vg_ready
goto check_vg_ready
endi
endi
print ---- vgroup $data[0][0] leader locate on dnode $data[0][7]
print ---- vgroup $data[0][0] leader locate on dnode $data[0][7]
goto vg_ready
goto vg_ready
else
goto check_vg_ready
endi
endi
vg_ready:
vg_ready:
print ====> create stable/child table
print ====> create stable/child table
sql create table stb (ts timestamp, c1 int, c2 float, c3 binary(10)) tags (t1 int)
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
...
@@ -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)
sql create table interaction (ts timestamp, flag binary(10), childrows int, stbrows int)
print ====> start to run_back to insert data
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
print ====> waiting insert thread starting insert data
...
@@ -239,34 +238,34 @@ if $rows != $vgroups then
...
@@ -239,34 +238,34 @@ if $rows != $vgroups then
return -1
return -1
endi
endi
if $data[0][4] == LEADER then
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
goto check_vg_ready_2
endi
endi
if $data[0][8] != FLLOWER then
if $data[0][8] != F
O
LLOWER then
goto check_vg_ready_2
goto check_vg_ready_2
endi
endi
print ---- vgroup $data[0][0] leader switch to dnode $data[0][3]
print ---- vgroup $data[0][0] leader switch to dnode $data[0][3]
goto vg_ready_2
goto vg_ready_2
endi
elif $data[0][6] == LEADER then
if $data[0][6] == LEADER then
if $data[0][4] != FOLLOWER then
if $data[0][4] != FLLOWER then
goto check_vg_ready_2
goto check_vg_ready_2
endi
endi
if $data[0][8] != FLLOWER then
if $data[0][8] != F
O
LLOWER then
goto check_vg_ready_2
goto check_vg_ready_2
endi
endi
print ---- vgroup $data[0][0] leader switch to dnode $data[0][5]
print ---- vgroup $data[0][0] leader switch to dnode $data[0][5]
goto vg_ready_2
goto vg_ready_2
endi
elif $data[0][8] == LEADER then
if $data[0][8] == LEADER then
if $data[0][4] != FOLLOWER then
if $data[0][4] != FLLOWER then
goto check_vg_ready_2
goto check_vg_ready_2
endi
endi
if $data[0][6] != FLLOWER then
if $data[0][6] != F
O
LLOWER then
goto check_vg_ready_2
goto check_vg_ready_2
endi
endi
print ---- vgroup $data[0][0] leader switch to dnode $data[0][7]
print ---- vgroup $data[0][0] leader switch to dnode $data[0][7]
goto vg_ready_2
goto vg_ready_2
else
goto check_vg_ready_2
endi
endi
vg_ready_2:
vg_ready_2:
...
@@ -344,28 +343,28 @@ if $rows != $vgroups then
...
@@ -344,28 +343,28 @@ if $rows != $vgroups then
return -1
return -1
endi
endi
if $data[0][4] == LEADER then
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
goto check_vg_ready_1
endi
endi
if $data[0][8] != FLLOWER then
if $data[0][8] != F
O
LLOWER then
goto check_vg_ready_1
goto check_vg_ready_1
endi
endi
goto vg_ready_1
goto vg_ready_1
endi
endi
if $data[0][6] == LEADER then
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
goto check_vg_ready_1
endi
endi
if $data[0][8] != FLLOWER then
if $data[0][8] != F
O
LLOWER then
goto check_vg_ready_1
goto check_vg_ready_1
endi
endi
goto vg_ready_1
goto vg_ready_1
endi
endi
if $data[0][8] == LEADER then
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
goto check_vg_ready_1
endi
endi
if $data[0][6] != FLLOWER then
if $data[0][6] != F
O
LLOWER then
goto check_vg_ready_1
goto check_vg_ready_1
endi
endi
goto vg_ready_1
goto vg_ready_1
...
@@ -420,7 +419,6 @@ elif $data[0][6] == LEADER then
...
@@ -420,7 +419,6 @@ elif $data[0][6] == LEADER then
goto check_vg_ready_3
goto check_vg_ready_3
endi
endi
print ---- vgroup $data[0][0] leader locating dnode $data[0][7]
print ---- vgroup $data[0][0] leader locating dnode $data[0][7]
endi
elif $data[0][8] == LEADER then
elif $data[0][8] == LEADER then
if $data[0][4] == LEADER then
if $data[0][4] == LEADER then
goto check_vg_ready_3
goto check_vg_ready_3
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录