Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
e35ebdad
T
TDengine
项目概览
taosdata
/
TDengine
11 个月 前同步成功
通知
1179
Star
22014
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,发现更多精彩内容 >>
提交
e35ebdad
编写于
6月 02, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: rename LEADER to leader
上级
27c1687a
变更
26
隐藏空白更改
内联
并排
Showing
26 changed file
with
352 addition
and
352 deletion
+352
-352
source/dnode/mnode/impl/src/mndMnode.c
source/dnode/mnode/impl/src/mndMnode.c
+4
-4
source/dnode/mnode/impl/src/mndVgroup.c
source/dnode/mnode/impl/src/mndVgroup.c
+1
-1
source/libs/sync/src/syncMain.c
source/libs/sync/src/syncMain.c
+4
-4
source/util/src/terror.c
source/util/src/terror.c
+1
-1
tests/script/tsim/bnode/basic1.sim
tests/script/tsim/bnode/basic1.sim
+2
-2
tests/script/tsim/db/alter_option.sim
tests/script/tsim/db/alter_option.sim
+15
-15
tests/script/tsim/db/alter_replica_13.sim
tests/script/tsim/db/alter_replica_13.sim
+3
-3
tests/script/tsim/dnode/basic1.sim
tests/script/tsim/dnode/basic1.sim
+2
-2
tests/script/tsim/mnode/basic1.sim
tests/script/tsim/mnode/basic1.sim
+6
-6
tests/script/tsim/mnode/basic2.sim
tests/script/tsim/mnode/basic2.sim
+3
-3
tests/script/tsim/mnode/basic3.sim
tests/script/tsim/mnode/basic3.sim
+4
-4
tests/script/tsim/mnode/basic4.sim
tests/script/tsim/mnode/basic4.sim
+22
-22
tests/script/tsim/qnode/basic1.sim
tests/script/tsim/qnode/basic1.sim
+2
-2
tests/script/tsim/query/explain.sim
tests/script/tsim/query/explain.sim
+1
-1
tests/script/tsim/query/scalarNull.sim
tests/script/tsim/query/scalarNull.sim
+1
-1
tests/script/tsim/query/udf.sim
tests/script/tsim/query/udf.sim
+1
-1
tests/script/tsim/snode/basic1.sim
tests/script/tsim/snode/basic1.sim
+2
-2
tests/script/tsim/sync/3Replica1VgElect.sim
tests/script/tsim/sync/3Replica1VgElect.sim
+27
-27
tests/script/tsim/sync/3Replica5VgElect.sim
tests/script/tsim/sync/3Replica5VgElect.sim
+135
-135
tests/script/tsim/sync/oneReplica1VgElect.sim
tests/script/tsim/sync/oneReplica1VgElect.sim
+12
-12
tests/script/tsim/sync/oneReplica1VgElectWithInsert.sim
tests/script/tsim/sync/oneReplica1VgElectWithInsert.sim
+12
-12
tests/script/tsim/sync/oneReplica5VgElect.sim
tests/script/tsim/sync/oneReplica5VgElect.sim
+30
-30
tests/script/tsim/sync/threeReplica1VgElect.sim
tests/script/tsim/sync/threeReplica1VgElect.sim
+21
-21
tests/script/tsim/sync/threeReplica1VgElectWihtInsert.sim
tests/script/tsim/sync/threeReplica1VgElectWihtInsert.sim
+39
-39
tests/script/tsim/trans/create_db.sim
tests/script/tsim/trans/create_db.sim
+1
-1
tests/system-test/0-others/taosdMonitor.py
tests/system-test/0-others/taosdMonitor.py
+1
-1
未找到文件。
source/dnode/mnode/impl/src/mndMnode.c
浏览文件 @
e35ebdad
...
...
@@ -655,7 +655,7 @@ static int32_t mndRetrieveMnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB
pColInfo
=
taosArrayGet
(
pBlock
->
pDataBlock
,
cols
++
);
colDataAppend
(
pColInfo
,
numOfRows
,
b1
,
false
);
const
char
*
roles
=
"
OFFLINE
"
;
const
char
*
roles
=
"
offline
"
;
if
(
pObj
->
id
==
pMnode
->
selfDnodeId
)
{
roles
=
syncStr
(
TAOS_SYNC_STATE_LEADER
);
}
...
...
@@ -667,9 +667,9 @@ static int32_t mndRetrieveMnodes(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *pB
pColInfo
=
taosArrayGet
(
pBlock
->
pDataBlock
,
cols
++
);
colDataAppend
(
pColInfo
,
numOfRows
,
(
const
char
*
)
b2
,
false
);
const
char
*
status
=
"
READY
"
;
if
(
objStatus
==
SDB_STATUS_CREATING
)
status
=
"
CREATING
"
;
if
(
objStatus
==
SDB_STATUS_DROPPING
)
status
=
"
DROPPING
"
;
const
char
*
status
=
"
ready
"
;
if
(
objStatus
==
SDB_STATUS_CREATING
)
status
=
"
creating
"
;
if
(
objStatus
==
SDB_STATUS_DROPPING
)
status
=
"
dropping
"
;
char
b3
[
9
+
VARSTR_HEADER_SIZE
]
=
{
0
};
STR_WITH_MAXSIZE_TO_VARSTR
(
b3
,
status
,
pShow
->
pMeta
->
pSchemas
[
cols
].
bytes
);
pColInfo
=
taosArrayGet
(
pBlock
->
pDataBlock
,
cols
++
);
...
...
source/dnode/mnode/impl/src/mndVgroup.c
浏览文件 @
e35ebdad
...
...
@@ -705,7 +705,7 @@ static int32_t mndRetrieveVgroups(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *p
}
char
buf1
[
20
]
=
{
0
};
const
char
*
role
=
online
?
syncStr
(
pVgroup
->
vnodeGid
[
i
].
role
)
:
"
OFFLINE
"
;
const
char
*
role
=
online
?
syncStr
(
pVgroup
->
vnodeGid
[
i
].
role
)
:
"
offline
"
;
STR_WITH_MAXSIZE_TO_VARSTR
(
buf1
,
role
,
pShow
->
pMeta
->
pSchemas
[
cols
].
bytes
);
pColInfo
=
taosArrayGet
(
pBlock
->
pDataBlock
,
cols
++
);
...
...
source/libs/sync/src/syncMain.c
浏览文件 @
e35ebdad
...
...
@@ -1450,12 +1450,12 @@ static void syncFreeNode(void* param) {
const
char
*
syncStr
(
ESyncState
state
)
{
switch
(
state
)
{
case
TAOS_SYNC_STATE_FOLLOWER
:
return
"
FOLLOWER
"
;
return
"
follower
"
;
case
TAOS_SYNC_STATE_CANDIDATE
:
return
"
CANDIDATE
"
;
return
"
candidate
"
;
case
TAOS_SYNC_STATE_LEADER
:
return
"
LEADER
"
;
return
"
leader
"
;
default:
return
"
ERROR
"
;
return
"
error
"
;
}
}
source/util/src/terror.c
浏览文件 @
e35ebdad
...
...
@@ -190,7 +190,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_MND_BNODE_ALREADY_EXIST, "Bnode already exists"
TAOS_DEFINE_ERROR
(
TSDB_CODE_MND_BNODE_NOT_EXIST
,
"Bnode not there"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_MND_TOO_FEW_MNODES
,
"The replicas of mnode cannot less than 1"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_MND_TOO_MANY_MNODES
,
"The replicas of mnode cannot exceed 3"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_MND_CANT_DROP_MASTER
,
"Can't drop mnode which is
LEADER
"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_MND_CANT_DROP_MASTER
,
"Can't drop mnode which is
leader
"
)
// mnode-acct
TAOS_DEFINE_ERROR
(
TSDB_CODE_MND_ACCT_ALREADY_EXIST
,
"Account already exists"
)
...
...
tests/script/tsim/bnode/basic1.sim
浏览文件 @
e35ebdad
...
...
@@ -24,7 +24,7 @@ if $data00 != 1 then
return -1
endi
if $data02 !=
LEADER
then
if $data02 !=
leader
then
return -1
endi
...
...
@@ -71,7 +71,7 @@ if $data00 != 1 then
return -1
endi
if $data02 !=
LEADER
then
if $data02 !=
leader
then
return -1
endi
...
...
tests/script/tsim/db/alter_option.sim
浏览文件 @
e35ebdad
...
...
@@ -131,43 +131,43 @@ endi
sleep 3000
#sql show db.vgroups
#if $data[0][4] ==
LEADER
then
# if $data[0][6] !=
FOLLOWER
then
#if $data[0][4] ==
leader
then
# if $data[0][6] !=
follower
then
# return -1
# endi
# if $data[0][8] !=
FOLLOWER
then
# if $data[0][8] !=
follower
then
# return -1
# endi
#endi
#if $data[0][6] ==
LEADER
then
# if $data[0][4] !=
FOLLOWER
then
#if $data[0][6] ==
leader
then
# if $data[0][4] !=
follower
then
# return -1
# endi
# if $data[0][8] !=
FOLLOWER
then
# if $data[0][8] !=
follower
then
# return -1
# endi
#endi
#if $data[0][8] ==
LEADER
then
# if $data[0][4] !=
FOLLOWER
then
#if $data[0][8] ==
leader
then
# if $data[0][4] !=
follower
then
# return -1
# endi
# if $data[0][6] !=
FOLLOWER
then
# if $data[0][6] !=
follower
then
# return -1
# endi
#endi
#
#if $data[0][4] !=
LEADER
then
# if $data[0][4] !=
FOLLOWER
then
#if $data[0][4] !=
leader
then
# if $data[0][4] !=
follower
then
# return -1
# endi
#endi
#if $data[0][6] !=
LEADER
then
# if $data[0][6] !=
FOLLOWER
then
#if $data[0][6] !=
leader
then
# if $data[0][6] !=
follower
then
# return -1
# endi
#endi
#if $data[0][8] !=
LEADER
then
# if $data[0][8] !=
FOLLOWER
then
#if $data[0][8] !=
leader
then
# if $data[0][8] !=
follower
then
# return -1
# endi
#endi
...
...
tests/script/tsim/db/alter_replica_13.sim
浏览文件 @
e35ebdad
...
...
@@ -117,13 +117,13 @@ step4:
sql show db.vgroups
print ===> rows: $rows
print ===> $data00 $data01 $data02 $data03 $data04 $data05
if $data[0][4] !=
LEADER
then
if $data[0][4] !=
leader
then
goto step4
endi
if $data[0][6] !=
FOLLOWER
then
if $data[0][6] !=
follower
then
goto step4
endi
if $data[0][8] !=
FOLLOWER
then
if $data[0][8] !=
follower
then
goto step4
endi
...
...
tests/script/tsim/dnode/basic1.sim
浏览文件 @
e35ebdad
...
...
@@ -27,7 +27,7 @@ if $data00 != 1 then
return -1
endi
if $data02 !=
LEADER
then
if $data02 !=
leader
then
return -1
endi
...
...
@@ -74,7 +74,7 @@ if $data00 != 1 then
return -1
endi
if $data02 !=
LEADER
then
if $data02 !=
leader
then
return -1
endi
...
...
tests/script/tsim/mnode/basic1.sim
浏览文件 @
e35ebdad
...
...
@@ -15,7 +15,7 @@ if $data00 != 1 then
return -1
endi
if $data02 !=
LEADER
then
if $data02 !=
leader
then
return -1
endi
...
...
@@ -59,13 +59,13 @@ endi
if $data(1)[0] != 1 then
return -1
endi
if $data(1)[2] !=
LEADER
then
if $data(1)[2] !=
leader
then
return -1
endi
if $data(2)[0] != 2 then
return -1
endi
if $data(2)[2] !=
FOLLOWER
then
if $data(2)[2] !=
follower
then
goto step2
endi
...
...
@@ -95,7 +95,7 @@ endi
if $data(1)[0] != 1 then
return -1
endi
if $data(1)[2] !=
LEADER
then
if $data(1)[2] !=
leader
then
return -1
endi
if $data(2)[0] != null then
...
...
@@ -131,13 +131,13 @@ endi
if $data(1)[0] != 1 then
return -1
endi
if $data(1)[2] !=
LEADER
then
if $data(1)[2] !=
leader
then
return -1
endi
if $data(2)[0] != 2 then
return -1
endi
if $data(2)[2] !=
FOLLOWER
then
if $data(2)[2] !=
follower
then
goto step3
endi
...
...
tests/script/tsim/mnode/basic2.sim
浏览文件 @
e35ebdad
...
...
@@ -15,7 +15,7 @@ if $data00 != 1 then
return -1
endi
if $data02 !=
LEADER
then
if $data02 !=
leader
then
return -1
endi
...
...
@@ -56,13 +56,13 @@ endi
if $data(1)[0] != 1 then
return -1
endi
if $data(1)[2] !=
LEADER
then
if $data(1)[2] !=
leader
then
return -1
endi
if $data(2)[0] != 2 then
return -1
endi
if $data(2)[2] !=
FOLLOWER
then
if $data(2)[2] !=
follower
then
goto step2
endi
...
...
tests/script/tsim/mnode/basic3.sim
浏览文件 @
e35ebdad
...
...
@@ -49,13 +49,13 @@ step2:
return -1
endi
sql show mnodes -x step2
if $data(1)[2] !=
LEADER
then
if $data(1)[2] !=
leader
then
goto step2
endi
if $data(2)[2] !=
FOLLOWER
then
if $data(2)[2] !=
follower
then
goto step2
endi
if $data(3)[2] !=
FOLLOWER
then
if $data(3)[2] !=
follower
then
goto step2
endi
...
...
@@ -114,7 +114,7 @@ print $data(1)[0] $data(1)[1] $data(1)[2]
print $data(2)[0] $data(2)[1] $data(2)[2]
print $data(3)[0] $data(3)[1] $data(3)[2]
if $data(2)[2] !=
OFFLINE
then
if $data(2)[2] !=
offline
then
goto step5
endi
...
...
tests/script/tsim/mnode/basic4.sim
浏览文件 @
e35ebdad
...
...
@@ -63,22 +63,22 @@ print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4]
print $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4]
print $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4]
if $data(1)[2] !=
LEADER
then
if $data(1)[2] !=
leader
then
goto step3
endi
if $data(2)[2] !=
FOLLOWER
then
if $data(2)[2] !=
follower
then
goto step3
endi
if $data(3)[2] !=
OFFLINE
then
if $data(3)[2] !=
offline
then
goto step3
endi
if $data(1)[3] !=
READY
then
if $data(1)[3] !=
ready
then
goto step3
endi
if $data(2)[3] !=
READY
then
if $data(2)[3] !=
ready
then
goto step3
endi
if $data(3)[3] !=
CREATING
then
if $data(3)[3] !=
creating
then
goto step3
endi
...
...
@@ -97,22 +97,22 @@ print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4]
print $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4]
print $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4]
if $data(1)[2] !=
LEADER
then
if $data(1)[2] !=
leader
then
goto step4
endi
if $data(2)[2] !=
FOLLOWER
then
if $data(2)[2] !=
follower
then
goto step4
endi
if $data(3)[2] !=
FOLLOWER
then
if $data(3)[2] !=
follower
then
goto step4
endi
if $data(1)[3] !=
READY
then
if $data(1)[3] !=
ready
then
goto step4
endi
if $data(2)[3] !=
READY
then
if $data(2)[3] !=
ready
then
goto step4
endi
if $data(3)[3] !=
READY
then
if $data(3)[3] !=
ready
then
goto step4
endi
...
...
@@ -132,22 +132,22 @@ print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4]
print $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4]
print $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4]
if $data(1)[2] !=
LEADER
then
if $data(1)[2] !=
leader
then
goto step5
endi
if $data(2)[2] !=
FOLLOWER
then
if $data(2)[2] !=
follower
then
goto step5
endi
if $data(3)[2] !=
OFFLINE
then
if $data(3)[2] !=
offline
then
goto step5
endi
if $data(1)[3] !=
READY
then
if $data(1)[3] !=
ready
then
goto step5
endi
if $data(2)[3] !=
READY
then
if $data(2)[3] !=
ready
then
goto step5
endi
if $data(3)[3] !=
DROPPING
then
if $data(3)[3] !=
dropping
then
goto step5
endi
...
...
@@ -169,19 +169,19 @@ print $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4]
if $rows != 2 then
goto step6
endi
if $data(1)[2] !=
LEADER
then
if $data(1)[2] !=
leader
then
goto step6
endi
if $data(2)[2] !=
FOLLOWER
then
if $data(2)[2] !=
follower
then
goto step6
endi
if $data(3)[2] != null then
goto step6
endi
if $data(1)[3] !=
READY
then
if $data(1)[3] !=
ready
then
goto step6
endi
if $data(2)[3] !=
READY
then
if $data(2)[3] !=
ready
then
goto step6
endi
if $data(3)[3] != null then
...
...
tests/script/tsim/qnode/basic1.sim
浏览文件 @
e35ebdad
...
...
@@ -24,7 +24,7 @@ if $data00 != 1 then
return -1
endi
if $data02 !=
LEADER
then
if $data02 !=
leader
then
return -1
endi
...
...
@@ -71,7 +71,7 @@ if $data00 != 1 then
return -1
endi
if $data02 !=
LEADER
then
if $data02 !=
leader
then
return -1
endi
...
...
tests/script/tsim/query/explain.sim
浏览文件 @
e35ebdad
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
print ========= start dnode1 as
LEADER
print ========= start dnode1 as
leader
system sh/exec.sh -n dnode1 -s start
sql connect
...
...
tests/script/tsim/query/scalarNull.sim
浏览文件 @
e35ebdad
...
...
@@ -4,7 +4,7 @@ system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c wallevel -v 2
system sh/cfg.sh -n dnode1 -c numOfMnodes -v 1
print ========= start dnode1 as
LEADER
print ========= start dnode1 as
leader
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
...
...
tests/script/tsim/query/udf.sim
浏览文件 @
e35ebdad
...
...
@@ -5,7 +5,7 @@ system sh/cfg.sh -n dnode1 -c wallevel -v 2
system sh/cfg.sh -n dnode1 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode1 -c udf -v 1
print ========= start dnode1 as
LEADER
print ========= start dnode1 as
leader
system sh/exec.sh -n dnode1 -s start
sleep 1000
sql connect
...
...
tests/script/tsim/snode/basic1.sim
浏览文件 @
e35ebdad
...
...
@@ -24,7 +24,7 @@ if $data00 != 1 then
return -1
endi
if $data02 !=
LEADER
then
if $data02 !=
leader
then
return -1
endi
...
...
@@ -71,7 +71,7 @@ if $data00 != 1 then
return -1
endi
if $data02 !=
LEADER
then
if $data02 !=
leader
then
return -1
endi
...
...
tests/script/tsim/sync/3Replica1VgElect.sim
浏览文件 @
e35ebdad
...
...
@@ -105,21 +105,21 @@ if $rows != $vgroups then
return -1
endi
if $data[0][4] ==
LEADER
then
if $data[0][6] ==
FOLLOWER
then
if $data[0][8] ==
FOLLOWER
then
if $data[0][4] ==
leader
then
if $data[0][6] ==
follower
then
if $data[0][8] ==
follower
then
print ---- vgroup $data[0][0] leader locate on dnode $data[0][3]
endi
endi
elif $data[0][6] ==
LEADER
then
if $data[0][4] ==
FOLLOWER
then
if $data[0][8] ==
FOLLOWER
then
elif $data[0][6] ==
leader
then
if $data[0][4] ==
follower
then
if $data[0][8] ==
follower
then
print ---- vgroup $data[0][0] leader locate on dnode $data[0][5]
endi
endi
elif $data[0][8] ==
LEADER
then
if $data[0][4] ==
FOLLOWER
then
if $data[0][6] ==
FOLLOWER
then
elif $data[0][8] ==
leader
then
if $data[0][4] ==
follower
then
if $data[0][6] ==
follower
then
print ---- vgroup $data[0][0] leader locate on dnode $data[0][7]
endi
endi
...
...
@@ -239,21 +239,21 @@ if $rows != $vgroups then
return -1
endi
if $data[0][4] ==
LEADER
then
if $data[0][6] ==
FOLLOWER
then
if $data[0][8] ==
FOLLOWER
then
if $data[0][4] ==
leader
then
if $data[0][6] ==
follower
then
if $data[0][8] ==
follower
then
print ---- vgroup $data[0][0] leader locate on dnode $data[0][3]
endi
endi
elif $data[0][6] ==
LEADER
then
if $data[0][4] ==
FOLLOWER
then
if $data[0][8] ==
FOLLOWER
then
elif $data[0][6] ==
leader
then
if $data[0][4] ==
follower
then
if $data[0][8] ==
follower
then
print ---- vgroup $data[0][0] leader locate on dnode $data[0][5]
endi
endi
elif $data[0][8] ==
LEADER
then
if $data[0][4] ==
FOLLOWER
then
if $data[0][6] ==
FOLLOWER
then
elif $data[0][8] ==
leader
then
if $data[0][4] ==
follower
then
if $data[0][6] ==
follower
then
print ---- vgroup $data[0][0] leader locate on dnode $data[0][7]
endi
endi
...
...
@@ -447,21 +447,21 @@ if $rows != $vgroups then
return -1
endi
if $data[0][4] ==
LEADER
then
if $data[0][6] ==
FOLLOWER
then
if $data[0][8] ==
FOLLOWER
then
if $data[0][4] ==
leader
then
if $data[0][6] ==
follower
then
if $data[0][8] ==
follower
then
print ---- vgroup $data[0][0] leader locate on dnode $data[0][3]
endi
endi
elif $data[0][6] ==
LEADER
then
if $data[0][4] ==
FOLLOWER
then
if $data[0][8] ==
FOLLOWER
then
elif $data[0][6] ==
leader
then
if $data[0][4] ==
follower
then
if $data[0][8] ==
follower
then
print ---- vgroup $data[0][0] leader locate on dnode $data[0][5]
endi
endi
elif $data[0][8] ==
LEADER
then
if $data[0][4] ==
FOLLOWER
then
if $data[0][6] ==
FOLLOWER
then
elif $data[0][8] ==
leader
then
if $data[0][4] ==
follower
then
if $data[0][6] ==
follower
then
print ---- vgroup $data[0][0] leader locate on dnode $data[0][7]
endi
endi
...
...
tests/script/tsim/sync/3Replica5VgElect.sim
浏览文件 @
e35ebdad
...
...
@@ -108,21 +108,21 @@ if $rows != $vgroups then
return -1
endi
if $data[0][4] ==
LEADER
then
if $data[0][6] ==
FOLLOWER
then
if $data[0][8] ==
FOLLOWER
then
if $data[0][4] ==
leader
then
if $data[0][6] ==
follower
then
if $data[0][8] ==
follower
then
print ---- vgroup $data[0][0] leader locate on dnode $data[0][3]
endi
endi
elif $data[0][6] ==
LEADER
then
if $data[0][4] ==
FOLLOWER
then
if $data[0][8] ==
FOLLOWER
then
elif $data[0][6] ==
leader
then
if $data[0][4] ==
follower
then
if $data[0][8] ==
follower
then
print ---- vgroup $data[0][0] leader locate on dnode $data[0][5]
endi
endi
elif $data[0][8] ==
LEADER
then
if $data[0][4] ==
FOLLOWER
then
if $data[0][6] ==
FOLLOWER
then
elif $data[0][8] ==
leader
then
if $data[0][4] ==
follower
then
if $data[0][6] ==
follower
then
print ---- vgroup $data[0][0] leader locate on dnode $data[0][7]
endi
endi
...
...
@@ -130,21 +130,21 @@ else
goto check_vg_ready
endi
if $data[1][4] ==
LEADER
then
if $data[1][6] ==
FOLLOWER
then
if $data[1][8] ==
FOLLOWER
then
if $data[1][4] ==
leader
then
if $data[1][6] ==
follower
then
if $data[1][8] ==
follower
then
print ---- vgroup $data[1][0] leader locate on dnode $data[1][3]
endi
endi
elif $data[1][6] ==
LEADER
then
if $data[1][4] ==
FOLLOWER
then
if $data[1][8] ==
FOLLOWER
then
elif $data[1][6] ==
leader
then
if $data[1][4] ==
follower
then
if $data[1][8] ==
follower
then
print ---- vgroup $data[1][0] leader locate on dnode $data[1][5]
endi
endi
elif $data[1][8] ==
LEADER
then
if $data[1][4] ==
FOLLOWER
then
if $data[1][6] ==
FOLLOWER
then
elif $data[1][8] ==
leader
then
if $data[1][4] ==
follower
then
if $data[1][6] ==
follower
then
print ---- vgroup $data[1][0] leader locate on dnode $data[1][7]
endi
endi
...
...
@@ -152,21 +152,21 @@ else
goto check_vg_ready
endi
if $data[2][4] ==
LEADER
then
if $data[2][6] ==
FOLLOWER
then
if $data[2][8] ==
FOLLOWER
then
if $data[2][4] ==
leader
then
if $data[2][6] ==
follower
then
if $data[2][8] ==
follower
then
print ---- vgroup $data[2][0] leader locate on dnode $data[2][3]
endi
endi
elif $data[2][6] ==
LEADER
then
if $data[2][4] ==
FOLLOWER
then
if $data[2][8] ==
FOLLOWER
then
elif $data[2][6] ==
leader
then
if $data[2][4] ==
follower
then
if $data[2][8] ==
follower
then
print ---- vgroup $data[2][0] leader locate on dnode $data[2][5]
endi
endi
elif $data[2][8] ==
LEADER
then
if $data[2][4] ==
FOLLOWER
then
if $data[2][6] ==
FOLLOWER
then
elif $data[2][8] ==
leader
then
if $data[2][4] ==
follower
then
if $data[2][6] ==
follower
then
print ---- vgroup $data[2][0] leader locate on dnode $data[2][7]
endi
endi
...
...
@@ -174,21 +174,21 @@ else
goto check_vg_ready
endi
if $data[3][4] ==
LEADER
then
if $data[3][6] ==
FOLLOWER
then
if $data[3][8] ==
FOLLOWER
then
if $data[3][4] ==
leader
then
if $data[3][6] ==
follower
then
if $data[3][8] ==
follower
then
print ---- vgroup $data[3][0] leader locate on dnode $data[3][3]
endi
endi
elif $data[3][6] ==
LEADER
then
if $data[3][4] ==
FOLLOWER
then
if $data[3][8] ==
FOLLOWER
then
elif $data[3][6] ==
leader
then
if $data[3][4] ==
follower
then
if $data[3][8] ==
follower
then
print ---- vgroup $data[3][0] leader locate on dnode $data[3][5]
endi
endi
elif $data[3][8] ==
LEADER
then
if $data[3][4] ==
FOLLOWER
then
if $data[3][6] ==
FOLLOWER
then
elif $data[3][8] ==
leader
then
if $data[3][4] ==
follower
then
if $data[3][6] ==
follower
then
print ---- vgroup $data[3][0] leader locate on dnode $data[3][7]
endi
endi
...
...
@@ -196,21 +196,21 @@ else
goto check_vg_ready
endi
if $data[4][4] ==
LEADER
then
if $data[4][6] ==
FOLLOWER
then
if $data[4][8] ==
FOLLOWER
then
if $data[4][4] ==
leader
then
if $data[4][6] ==
follower
then
if $data[4][8] ==
follower
then
print ---- vgroup $data[4][0] leader locate on dnode $data[4][3]
endi
endi
elif $data[4][6] ==
LEADER
then
if $data[4][4] ==
FOLLOWER
then
if $data[4][8] ==
FOLLOWER
then
elif $data[4][6] ==
leader
then
if $data[4][4] ==
follower
then
if $data[4][8] ==
follower
then
print ---- vgroup $data[4][0] leader locate on dnode $data[4][5]
endi
endi
elif $data[4][8] ==
LEADER
then
if $data[4][4] ==
FOLLOWER
then
if $data[4][6] ==
FOLLOWER
then
elif $data[4][8] ==
leader
then
if $data[4][4] ==
follower
then
if $data[4][6] ==
follower
then
print ---- vgroup $data[4][0] leader locate on dnode $data[4][7]
endi
endi
...
...
@@ -335,21 +335,21 @@ if $rows != $vgroups then
return -1
endi
if $data[0][4] ==
LEADER
then
if $data[0][6] ==
FOLLOWER
then
if $data[0][8] ==
FOLLOWER
then
if $data[0][4] ==
leader
then
if $data[0][6] ==
follower
then
if $data[0][8] ==
follower
then
print ---- vgroup $data[0][0] leader locate on dnode $data[0][3]
endi
endi
elif $data[0][6] ==
LEADER
then
if $data[0][4] ==
FOLLOWER
then
if $data[0][8] ==
FOLLOWER
then
elif $data[0][6] ==
leader
then
if $data[0][4] ==
follower
then
if $data[0][8] ==
follower
then
print ---- vgroup $data[0][0] leader locate on dnode $data[0][5]
endi
endi
elif $data[0][8] ==
LEADER
then
if $data[0][4] ==
FOLLOWER
then
if $data[0][6] ==
FOLLOWER
then
elif $data[0][8] ==
leader
then
if $data[0][4] ==
follower
then
if $data[0][6] ==
follower
then
print ---- vgroup $data[0][0] leader locate on dnode $data[0][7]
endi
endi
...
...
@@ -357,21 +357,21 @@ else
goto check_vg_ready1
endi
if $data[1][4] ==
LEADER
then
if $data[1][6] ==
FOLLOWER
then
if $data[1][8] ==
FOLLOWER
then
if $data[1][4] ==
leader
then
if $data[1][6] ==
follower
then
if $data[1][8] ==
follower
then
print ---- vgroup $data[1][0] leader locate on dnode $data[1][3]
endi
endi
elif $data[1][6] ==
LEADER
then
if $data[1][4] ==
FOLLOWER
then
if $data[1][8] ==
FOLLOWER
then
elif $data[1][6] ==
leader
then
if $data[1][4] ==
follower
then
if $data[1][8] ==
follower
then
print ---- vgroup $data[1][0] leader locate on dnode $data[1][5]
endi
endi
elif $data[1][8] ==
LEADER
then
if $data[1][4] ==
FOLLOWER
then
if $data[1][6] ==
FOLLOWER
then
elif $data[1][8] ==
leader
then
if $data[1][4] ==
follower
then
if $data[1][6] ==
follower
then
print ---- vgroup $data[1][0] leader locate on dnode $data[1][7]
endi
endi
...
...
@@ -379,21 +379,21 @@ else
goto check_vg_ready1
endi
if $data[2][4] ==
LEADER
then
if $data[2][6] ==
FOLLOWER
then
if $data[2][8] ==
FOLLOWER
then
if $data[2][4] ==
leader
then
if $data[2][6] ==
follower
then
if $data[2][8] ==
follower
then
print ---- vgroup $data[2][0] leader locate on dnode $data[2][3]
endi
endi
elif $data[2][6] ==
LEADER
then
if $data[2][4] ==
FOLLOWER
then
if $data[2][8] ==
FOLLOWER
then
elif $data[2][6] ==
leader
then
if $data[2][4] ==
follower
then
if $data[2][8] ==
follower
then
print ---- vgroup $data[2][0] leader locate on dnode $data[2][5]
endi
endi
elif $data[2][8] ==
LEADER
then
if $data[2][4] ==
FOLLOWER
then
if $data[2][6] ==
FOLLOWER
then
elif $data[2][8] ==
leader
then
if $data[2][4] ==
follower
then
if $data[2][6] ==
follower
then
print ---- vgroup $data[2][0] leader locate on dnode $data[2][7]
endi
endi
...
...
@@ -401,21 +401,21 @@ else
goto check_vg_ready1
endi
if $data[3][4] ==
LEADER
then
if $data[3][6] ==
FOLLOWER
then
if $data[3][8] ==
FOLLOWER
then
if $data[3][4] ==
leader
then
if $data[3][6] ==
follower
then
if $data[3][8] ==
follower
then
print ---- vgroup $data[3][0] leader locate on dnode $data[3][3]
endi
endi
elif $data[3][6] ==
LEADER
then
if $data[3][4] ==
FOLLOWER
then
if $data[3][8] ==
FOLLOWER
then
elif $data[3][6] ==
leader
then
if $data[3][4] ==
follower
then
if $data[3][8] ==
follower
then
print ---- vgroup $data[3][0] leader locate on dnode $data[3][5]
endi
endi
elif $data[3][8] ==
LEADER
then
if $data[3][4] ==
FOLLOWER
then
if $data[3][6] ==
FOLLOWER
then
elif $data[3][8] ==
leader
then
if $data[3][4] ==
follower
then
if $data[3][6] ==
follower
then
print ---- vgroup $data[3][0] leader locate on dnode $data[3][7]
endi
endi
...
...
@@ -423,21 +423,21 @@ else
goto check_vg_ready1
endi
if $data[4][4] ==
LEADER
then
if $data[4][6] ==
FOLLOWER
then
if $data[4][8] ==
FOLLOWER
then
if $data[4][4] ==
leader
then
if $data[4][6] ==
follower
then
if $data[4][8] ==
follower
then
print ---- vgroup $data[4][0] leader locate on dnode $data[4][3]
endi
endi
elif $data[4][6] ==
LEADER
then
if $data[4][4] ==
FOLLOWER
then
if $data[4][8] ==
FOLLOWER
then
elif $data[4][6] ==
leader
then
if $data[4][4] ==
follower
then
if $data[4][8] ==
follower
then
print ---- vgroup $data[4][0] leader locate on dnode $data[4][5]
endi
endi
elif $data[4][8] ==
LEADER
then
if $data[4][4] ==
FOLLOWER
then
if $data[4][6] ==
FOLLOWER
then
elif $data[4][8] ==
leader
then
if $data[4][4] ==
follower
then
if $data[4][6] ==
follower
then
print ---- vgroup $data[4][0] leader locate on dnode $data[4][7]
endi
endi
...
...
@@ -635,21 +635,21 @@ if $rows != $vgroups then
return -1
endi
if $data[0][4] ==
LEADER
then
if $data[0][6] ==
FOLLOWER
then
if $data[0][8] ==
FOLLOWER
then
if $data[0][4] ==
leader
then
if $data[0][6] ==
follower
then
if $data[0][8] ==
follower
then
print ---- vgroup $data[0][0] leader locate on dnode $data[0][3]
endi
endi
elif $data[0][6] ==
LEADER
then
if $data[0][4] ==
FOLLOWER
then
if $data[0][8] ==
FOLLOWER
then
elif $data[0][6] ==
leader
then
if $data[0][4] ==
follower
then
if $data[0][8] ==
follower
then
print ---- vgroup $data[0][0] leader locate on dnode $data[0][5]
endi
endi
elif $data[0][8] ==
LEADER
then
if $data[0][4] ==
FOLLOWER
then
if $data[0][6] ==
FOLLOWER
then
elif $data[0][8] ==
leader
then
if $data[0][4] ==
follower
then
if $data[0][6] ==
follower
then
print ---- vgroup $data[0][0] leader locate on dnode $data[0][7]
endi
endi
...
...
@@ -657,21 +657,21 @@ else
goto check_vg_ready3
endi
if $data[1][4] ==
LEADER
then
if $data[1][6] ==
FOLLOWER
then
if $data[1][8] ==
FOLLOWER
then
if $data[1][4] ==
leader
then
if $data[1][6] ==
follower
then
if $data[1][8] ==
follower
then
print ---- vgroup $data[1][0] leader locate on dnode $data[1][3]
endi
endi
elif $data[1][6] ==
LEADER
then
if $data[1][4] ==
FOLLOWER
then
if $data[1][8] ==
FOLLOWER
then
elif $data[1][6] ==
leader
then
if $data[1][4] ==
follower
then
if $data[1][8] ==
follower
then
print ---- vgroup $data[1][0] leader locate on dnode $data[1][5]
endi
endi
elif $data[1][8] ==
LEADER
then
if $data[1][4] ==
FOLLOWER
then
if $data[1][6] ==
FOLLOWER
then
elif $data[1][8] ==
leader
then
if $data[1][4] ==
follower
then
if $data[1][6] ==
follower
then
print ---- vgroup $data[1][0] leader locate on dnode $data[1][7]
endi
endi
...
...
@@ -679,21 +679,21 @@ else
goto check_vg_ready3
endi
if $data[2][4] ==
LEADER
then
if $data[2][6] ==
FOLLOWER
then
if $data[2][8] ==
FOLLOWER
then
if $data[2][4] ==
leader
then
if $data[2][6] ==
follower
then
if $data[2][8] ==
follower
then
print ---- vgroup $data[2][0] leader locate on dnode $data[2][3]
endi
endi
elif $data[2][6] ==
LEADER
then
if $data[2][4] ==
FOLLOWER
then
if $data[2][8] ==
FOLLOWER
then
elif $data[2][6] ==
leader
then
if $data[2][4] ==
follower
then
if $data[2][8] ==
follower
then
print ---- vgroup $data[2][0] leader locate on dnode $data[2][5]
endi
endi
elif $data[2][8] ==
LEADER
then
if $data[2][4] ==
FOLLOWER
then
if $data[2][6] ==
FOLLOWER
then
elif $data[2][8] ==
leader
then
if $data[2][4] ==
follower
then
if $data[2][6] ==
follower
then
print ---- vgroup $data[2][0] leader locate on dnode $data[2][7]
endi
endi
...
...
@@ -701,21 +701,21 @@ else
goto check_vg_ready3
endi
if $data[3][4] ==
LEADER
then
if $data[3][6] ==
FOLLOWER
then
if $data[3][8] ==
FOLLOWER
then
if $data[3][4] ==
leader
then
if $data[3][6] ==
follower
then
if $data[3][8] ==
follower
then
print ---- vgroup $data[3][0] leader locate on dnode $data[3][3]
endi
endi
elif $data[3][6] ==
LEADER
then
if $data[3][4] ==
FOLLOWER
then
if $data[3][8] ==
FOLLOWER
then
elif $data[3][6] ==
leader
then
if $data[3][4] ==
follower
then
if $data[3][8] ==
follower
then
print ---- vgroup $data[3][0] leader locate on dnode $data[3][5]
endi
endi
elif $data[3][8] ==
LEADER
then
if $data[3][4] ==
FOLLOWER
then
if $data[3][6] ==
FOLLOWER
then
elif $data[3][8] ==
leader
then
if $data[3][4] ==
follower
then
if $data[3][6] ==
follower
then
print ---- vgroup $data[3][0] leader locate on dnode $data[3][7]
endi
endi
...
...
@@ -723,21 +723,21 @@ else
goto check_vg_ready3
endi
if $data[4][4] ==
LEADER
then
if $data[4][6] ==
FOLLOWER
then
if $data[4][8] ==
FOLLOWER
then
if $data[4][4] ==
leader
then
if $data[4][6] ==
follower
then
if $data[4][8] ==
follower
then
print ---- vgroup $data[4][0] leader locate on dnode $data[4][3]
endi
endi
elif $data[4][6] ==
LEADER
then
if $data[4][4] ==
FOLLOWER
then
if $data[4][8] ==
FOLLOWER
then
elif $data[4][6] ==
leader
then
if $data[4][4] ==
follower
then
if $data[4][8] ==
follower
then
print ---- vgroup $data[4][0] leader locate on dnode $data[4][5]
endi
endi
elif $data[4][8] ==
LEADER
then
if $data[4][4] ==
FOLLOWER
then
if $data[4][6] ==
FOLLOWER
then
elif $data[4][8] ==
leader
then
if $data[4][4] ==
follower
then
if $data[4][6] ==
follower
then
print ---- vgroup $data[4][0] leader locate on dnode $data[4][7]
endi
endi
...
...
tests/script/tsim/sync/oneReplica1VgElect.sim
浏览文件 @
e35ebdad
...
...
@@ -103,13 +103,13 @@ print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $d
if $rows != $vgroups then
return -1
endi
if $data[0][4] ==
LEADER
then
if $data[0][4] ==
leader
then
print ---- vgroup $data[0][0] leader locate on dnode $data[0][3]
goto vg_ready
elif $data[0][6] ==
LEADER
then
elif $data[0][6] ==
leader
then
print ---- vgroup $data[0][0] leader locate on dnode $data[0][5]
goto vg_ready
elif $data[0][8] ==
LEADER
then
elif $data[0][8] ==
leader
then
print ---- vgroup $data[0][0] leader locate on dnode $data[0][7]
goto vg_ready
else
...
...
@@ -154,11 +154,11 @@ switch_leader_to_offine_loop:
print ====> finde vnode of leader, and stop the dnode where the vnode is located, and query stb/ntb count(*)
sql show vgroups
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[0][6] $data[0][11] $data[0][12] $data[0][13]
if $data[0][4] ==
LEADER
then
if $data[0][4] ==
leader
then
$dnodeId = $data[0][3]
elif $data[0][6] ==
LEADER
then
elif $data[0][6] ==
leader
then
$dnodeId = $data[0][5]
elif $data[0][8] ==
LEADER
then
elif $data[0][8] ==
leader
then
$dnodeId = $data[0][7]
else
print ====> no leader vnode!!!
...
...
@@ -186,13 +186,13 @@ if $rows != $vgroups then
return -1
endi
if $data[0][4] ==
OFFLINE
then
if $data[0][4] ==
offline
then
print ---- vgroup $dnodeId leader switch to offline
goto vg_offline_1
elif $data[0][6] ==
OFFLINE
then
elif $data[0][6] ==
offline
then
print ---- vgroup $dnodeId leader switch to offline
goto vg_offline_1
elif $data[0][8] ==
OFFLINE
then
elif $data[0][8] ==
offline
then
print ---- vgroup $dnodeId leader switch to offline
goto vg_offline_1
else
...
...
@@ -218,13 +218,13 @@ print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $d
if $rows != $vgroups then
return -1
endi
if $data[0][4] ==
LEADER
then
if $data[0][4] ==
leader
then
print ---- vgroup $data[0][0] leader locate on dnode $data[0][3]
goto countinu_loop
elif $data[0][6] ==
LEADER
then
elif $data[0][6] ==
leader
then
print ---- vgroup $data[0][0] leader locate on dnode $data[0][5]
goto countinu_loop
elif $data[0][8] ==
LEADER
then
elif $data[0][8] ==
leader
then
print ---- vgroup $data[0][0] leader locate on dnode $data[0][7]
goto countinu_loop
else
...
...
tests/script/tsim/sync/oneReplica1VgElectWithInsert.sim
浏览文件 @
e35ebdad
...
...
@@ -104,7 +104,7 @@ print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $d
if $rows != $vgroups then
return -1
endi
if $data[0][4] ==
LEADER
then
if $data[0][4] ==
leader
then
if $data[0][6] != NULL then
goto check_vg_ready
endi
...
...
@@ -114,7 +114,7 @@ if $data[0][4] == LEADER then
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][6] ==
leader
then
if $data[0][4] != NULL then
goto check_vg_ready
endi
...
...
@@ -124,7 +124,7 @@ if $data[0][6] == LEADER then
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][8] ==
leader
then
if $data[0][4] != NULL then
goto check_vg_ready
endi
...
...
@@ -208,11 +208,11 @@ switch_leader_loop:
print ====> finde vnode of leader, and stop the dnode where the vnode is located, and query stb/ntb count(*)
sql show vgroups
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]
if $data[0][4] ==
LEADER
then
if $data[0][4] ==
leader
then
$dnodeId = $data[0][3]
elif $data[0][6] ==
LEADER
then
elif $data[0][6] ==
leader
then
$dnodeId = $data[0][5]
elif $data[0][8] ==
LEADER
then
elif $data[0][8] ==
leader
then
$dnodeId = $data[0][7]
else
print ====> no leader vnode!!!
...
...
@@ -238,7 +238,7 @@ print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $d
if $rows != $vgroups then
return -1
endi
if $data[0][4] ==
LEADER
then
if $data[0][4] ==
leader
then
if $data[0][6] != NULL then
goto check_vg_ready_2
endi
...
...
@@ -248,7 +248,7 @@ if $data[0][4] == LEADER then
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][6] ==
leader
then
if $data[0][4] != NULL then
goto check_vg_ready_2
endi
...
...
@@ -258,7 +258,7 @@ if $data[0][6] == LEADER then
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][8] ==
leader
then
if $data[0][4] != NULL then
goto check_vg_ready_2
endi
...
...
@@ -343,7 +343,7 @@ print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $d
if $rows != $vgroups then
return -1
endi
if $data[0][4] ==
LEADER
then
if $data[0][4] ==
leader
then
if $data[0][6] != NULL then
goto check_vg_ready_1
endi
...
...
@@ -352,7 +352,7 @@ if $data[0][4] == LEADER then
endi
goto vg_ready_1
endi
if $data[0][6] ==
LEADER
then
if $data[0][6] ==
leader
then
if $data[0][4] != NULL then
goto check_vg_ready_1
endi
...
...
@@ -361,7 +361,7 @@ if $data[0][6] == LEADER then
endi
goto vg_ready_1
endi
if $data[0][8] ==
LEADER
then
if $data[0][8] ==
leader
then
if $data[0][4] != NULL then
goto check_vg_ready_1
endi
...
...
tests/script/tsim/sync/oneReplica5VgElect.sim
浏览文件 @
e35ebdad
...
...
@@ -104,51 +104,51 @@ if $rows != $vgroups then
return -1
endi
if $data[0][4] ==
LEADER
then
if $data[0][4] ==
leader
then
print ---- vgroup $data[0][0] leader locate on dnode $data[0][3]
elif $data[0][6] ==
LEADER
then
elif $data[0][6] ==
leader
then
print ---- vgroup $data[0][0] leader locate on dnode $data[0][5]
elif $data[0][8] ==
LEADER
then
elif $data[0][8] ==
leader
then
print ---- vgroup $data[0][0] leader locate on dnode $data[0][7]
else
goto check_vg_ready
endi
if $data[1][4] ==
LEADER
then
if $data[1][4] ==
leader
then
print ---- vgroup $data[1][0] leader locate on dnode $data[0][3]
elif $data[1][6] ==
LEADER
then
elif $data[1][6] ==
leader
then
print ---- vgroup $data[1][0] leader locate on dnode $data[0][5]
elif $data[1][8] ==
LEADER
then
elif $data[1][8] ==
leader
then
print ---- vgroup $data[1][0] leader locate on dnode $data[0][7]
else
goto check_vg_ready
endi
if $data[2][4] ==
LEADER
then
if $data[2][4] ==
leader
then
print ---- vgroup $data[2][0] leader locate on dnode $data[0][3]
elif $data[2][6] ==
LEADER
then
elif $data[2][6] ==
leader
then
print ---- vgroup $data[2][0] leader locate on dnode $data[0][5]
elif $data[2][8] ==
LEADER
then
elif $data[2][8] ==
leader
then
print ---- vgroup $data[2][0] leader locate on dnode $data[0][7]
else
goto check_vg_ready
endi
if $data[3][4] ==
LEADER
then
if $data[3][4] ==
leader
then
print ---- vgroup $data[3][0] leader locate on dnode $data[0][3]
elif $data[3][6] ==
LEADER
then
elif $data[3][6] ==
leader
then
print ---- vgroup $data[3][0] leader locate on dnode $data[0][5]
elif $data[3][8] ==
LEADER
then
elif $data[3][8] ==
leader
then
print ---- vgroup $data[3][0] leader locate on dnode $data[0][7]
else
goto check_vg_ready
endi
if $data[4][4] ==
LEADER
then
if $data[4][4] ==
leader
then
print ---- vgroup $data[4][0] leader locate on dnode $data[0][3]
elif $data[4][6] ==
LEADER
then
elif $data[4][6] ==
leader
then
print ---- vgroup $data[4][0] leader locate on dnode $data[0][5]
elif $data[4][8] ==
LEADER
then
elif $data[4][8] ==
leader
then
print ---- vgroup $data[4][0] leader locate on dnode $data[0][7]
else
goto check_vg_ready
...
...
@@ -272,51 +272,51 @@ if $rows != $vgroups then
return -1
endi
if $data[0][4] ==
LEADER
then
if $data[0][4] ==
leader
then
print ---- vgroup $data[0][0] leader locate on dnode $data[0][3]
elif $data[0][6] ==
LEADER
then
elif $data[0][6] ==
leader
then
print ---- vgroup $data[0][0] leader locate on dnode $data[0][5]
elif $data[0][8] ==
LEADER
then
elif $data[0][8] ==
leader
then
print ---- vgroup $data[0][0] leader locate on dnode $data[0][7]
else
goto check_vg_ready1
endi
if $data[1][4] ==
LEADER
then
if $data[1][4] ==
leader
then
print ---- vgroup $data[1][0] leader locate on dnode $data[1][3]
elif $data[1][6] ==
LEADER
then
elif $data[1][6] ==
leader
then
print ---- vgroup $data[1][0] leader locate on dnode $data[1][5]
elif $data[1][8] ==
LEADER
then
elif $data[1][8] ==
leader
then
print ---- vgroup $data[1][0] leader locate on dnode $data[1][7]
else
goto check_vg_ready1
endi
if $data[2][4] ==
LEADER
then
if $data[2][4] ==
leader
then
print ---- vgroup $data[2][0] leader locate on dnode $data[2][3]
elif $data[2][6] ==
LEADER
then
elif $data[2][6] ==
leader
then
print ---- vgroup $data[2][0] leader locate on dnode $data[2][5]
elif $data[2][8] ==
LEADER
then
elif $data[2][8] ==
leader
then
print ---- vgroup $data[2][0] leader locate on dnode $data[2][7]
else
goto check_vg_ready
endi
if $data[3][4] ==
LEADER
then
if $data[3][4] ==
leader
then
print ---- vgroup $data[3][0] leader locate on dnode $data[3][3]
elif $data[3][6] ==
LEADER
then
elif $data[3][6] ==
leader
then
print ---- vgroup $data[3][0] leader locate on dnode $data[3][5]
elif $data[3][8] ==
LEADER
then
elif $data[3][8] ==
leader
then
print ---- vgroup $data[3][0] leader locate on dnode $data[3][7]
else
goto check_vg_ready1
endi
if $data[4][4] ==
LEADER
then
if $data[4][4] ==
leader
then
print ---- vgroup $data[4][0] leader locate on dnode $data[4][3]
elif $data[4][6] ==
LEADER
then
elif $data[4][6] ==
leader
then
print ---- vgroup $data[4][0] leader locate on dnode $data[4][5]
elif $data[4][8] ==
LEADER
then
elif $data[4][8] ==
leader
then
print ---- vgroup $data[4][0] leader locate on dnode $data[4][7]
else
goto check_vg_ready1
...
...
tests/script/tsim/sync/threeReplica1VgElect.sim
浏览文件 @
e35ebdad
...
...
@@ -104,7 +104,7 @@ print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $d
if $rows != $vgroups then
return -1
endi
if $data[0][4] ==
LEADER
then
if $data[0][4] ==
leader
then
if $data[0][6] != FLLOWER then
goto check_vg_ready
endi
...
...
@@ -114,7 +114,7 @@ if $data[0][4] == LEADER then
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][6] ==
leader
then
if $data[0][4] != FLLOWER then
goto check_vg_ready
endi
...
...
@@ -124,7 +124,7 @@ if $data[0][6] == LEADER then
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][8] ==
leader
then
if $data[0][4] != FLLOWER then
goto check_vg_ready
endi
...
...
@@ -199,11 +199,11 @@ endi
print ====> finde vnode of leader, and stop the dnode where the vnode is located, and query stb/ntb count(*)
sql show vgroups
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]
if $data[0][4] ==
LEADER
then
if $data[0][4] ==
leader
then
$dnodeId = $data[0][3]
elif $data[0][6] ==
LEADER
then
elif $data[0][6] ==
leader
then
$dnodeId = $data[0][5]
elif $data[0][8] ==
LEADER
then
elif $data[0][8] ==
leader
then
$dnodeId = $data[0][7]
else
print ====> no leader vnode!!!
...
...
@@ -216,11 +216,11 @@ system sh/exec.sh -n $dnodeId -s stop -x SIGINT
sql show vgroups
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]
if $data[0][4] ==
LEADER
then
if $data[0][4] ==
leader
then
print ---- vgroup $data[0][0] leader switch to dnode $data[0][3]
elif $data[0][6] ==
LEADER
then
elif $data[0][6] ==
leader
then
print ---- vgroup $data[0][0] leader switch to dnode $data[0][5]
elif $data[0][8] ==
LEADER
then
elif $data[0][8] ==
leader
then
print ---- vgroup $data[0][0] leader switch to dnode $data[0][7]
else
print ====> no leader vnode!!!
...
...
@@ -264,7 +264,7 @@ print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $d
if $rows != $vgroups then
return -1
endi
if $data[0][4] ==
LEADER
then
if $data[0][4] ==
leader
then
if $data[0][6] != FLLOWER then
goto check_vg_ready_1
endi
...
...
@@ -273,7 +273,7 @@ if $data[0][4] == LEADER then
endi
goto vg_ready_1
endi
if $data[0][6] ==
LEADER
then
if $data[0][6] ==
leader
then
if $data[0][4] != FLLOWER then
goto check_vg_ready_1
endi
...
...
@@ -282,7 +282,7 @@ if $data[0][6] == LEADER then
endi
goto vg_ready_1
endi
if $data[0][8] ==
LEADER
then
if $data[0][8] ==
leader
then
if $data[0][4] != FLLOWER then
goto check_vg_ready_1
endi
...
...
@@ -325,27 +325,27 @@ system sh/exec.sh -n $dnodeId -s stop -x SIGINT
check_vg_ready_3:
sql show vgroups
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]
if $data[0][4] ==
LEADER
then
if $data[0][6] ==
LEADER
then
if $data[0][4] ==
leader
then
if $data[0][6] ==
leader
then
goto check_vg_ready_3
endi
if $data[0][8] ==
LEADER
then
if $data[0][8] ==
leader
then
goto check_vg_ready_3
endi
print ---- vgroup $data[0][0] leader locating dnode $data[0][5]
elif $data[0][6] ==
LEADER
then
if $data[0][4] ==
LEADER
then
elif $data[0][6] ==
leader
then
if $data[0][4] ==
leader
then
goto check_vg_ready_3
endi
if $data[0][8] ==
LEADER
then
if $data[0][8] ==
leader
then
goto check_vg_ready_3
endi
print ---- vgroup $data[0][0] leader locating dnode $data[0][7]
elif $data[0][8] ==
LEADER
then
if $data[0][4] ==
LEADER
then
elif $data[0][8] ==
leader
then
if $data[0][4] ==
leader
then
goto check_vg_ready_3
endi
if $data[0][6] ==
LEADER
then
if $data[0][6] ==
leader
then
goto check_vg_ready_3
endi
print ---- vgroup $data[0][0] leader locating dnode $data[0][9]
...
...
tests/script/tsim/sync/threeReplica1VgElectWihtInsert.sim
浏览文件 @
e35ebdad
...
...
@@ -103,29 +103,29 @@ print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $d
if $rows != $vgroups then
return -1
endi
if $data[0][4] ==
LEADER
then
if $data[0][6] !=
FOLLOWER
then
if $data[0][4] ==
leader
then
if $data[0][6] !=
follower
then
goto check_vg_ready
endi
if $data[0][8] !=
FOLLOWER
then
if $data[0][8] !=
follower
then
goto check_vg_ready
endi
print ---- vgroup $data[0][0] leader locate on dnode $data[0][3]
goto vg_ready
elif $data[0][6] ==
LEADER
then
if $data[0][4] !=
FOLLOWER
then
elif $data[0][6] ==
leader
then
if $data[0][4] !=
follower
then
goto check_vg_ready
endi
if $data[0][8] !=
FOLLOWER
then
if $data[0][8] !=
follower
then
goto check_vg_ready
endi
print ---- vgroup $data[0][0] leader locate on dnode $data[0][5]
goto vg_ready
elif $data[0][8] ==
LEADER
then
if $data[0][4] !=
FOLLOWER
then
elif $data[0][8] ==
leader
then
if $data[0][4] !=
follower
then
goto check_vg_ready
endi
if $data[0][6] !=
FOLLOWER
then
if $data[0][6] !=
follower
then
goto check_vg_ready
endi
print ---- vgroup $data[0][0] leader locate on dnode $data[0][7]
...
...
@@ -193,11 +193,11 @@ switch_leader_loop:
print ====> finde vnode of leader, and stop the dnode where the vnode is located, and query stb/ntb count(*)
sql show vgroups
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]
if $data[0][4] ==
LEADER
then
if $data[0][4] ==
leader
then
$dnodeId = $data[0][3]
elif $data[0][6] ==
LEADER
then
elif $data[0][6] ==
leader
then
$dnodeId = $data[0][5]
elif $data[0][8] ==
LEADER
then
elif $data[0][8] ==
leader
then
$dnodeId = $data[0][7]
else
print ====> no leader vnode!!!
...
...
@@ -226,29 +226,29 @@ print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $d
if $rows != $vgroups then
return -1
endi
if $data[0][4] ==
LEADER
then
if $data[0][6] !=
FOLLOWER
then
if $data[0][4] ==
leader
then
if $data[0][6] !=
follower
then
goto check_vg_ready_2
endi
if $data[0][8] !=
FOLLOWER
then
if $data[0][8] !=
follower
then
goto check_vg_ready_2
endi
print ---- vgroup $dnodeId leader switch to dnode $data[0][3]
goto vg_ready_2
elif $data[0][6] ==
LEADER
then
if $data[0][4] !=
FOLLOWER
then
elif $data[0][6] ==
leader
then
if $data[0][4] !=
follower
then
goto check_vg_ready_2
endi
if $data[0][8] !=
FOLLOWER
then
if $data[0][8] !=
follower
then
goto check_vg_ready_2
endi
print ---- vgroup $dnodeId leader switch to dnode $data[0][5]
goto vg_ready_2
elif $data[0][8] ==
LEADER
then
if $data[0][4] !=
FOLLOWER
then
elif $data[0][8] ==
leader
then
if $data[0][4] !=
follower
then
goto check_vg_ready_2
endi
if $data[0][6] !=
FOLLOWER
then
if $data[0][6] !=
follower
then
goto check_vg_ready_2
endi
print ---- vgroup $dnodeId leader switch to dnode $data[0][7]
...
...
@@ -329,29 +329,29 @@ print $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $d
if $rows != $vgroups then
return -1
endi
if $data[0][4] ==
LEADER
then
if $data[0][6] !=
FOLLOWER
then
if $data[0][4] ==
leader
then
if $data[0][6] !=
follower
then
goto check_vg_ready_1
endi
if $data[0][8] !=
FOLLOWER
then
if $data[0][8] !=
follower
then
goto check_vg_ready_1
endi
goto vg_ready_1
endi
if $data[0][6] ==
LEADER
then
if $data[0][4] !=
FOLLOWER
then
if $data[0][6] ==
leader
then
if $data[0][4] !=
follower
then
goto check_vg_ready_1
endi
if $data[0][8] !=
FOLLOWER
then
if $data[0][8] !=
follower
then
goto check_vg_ready_1
endi
goto vg_ready_1
endi
if $data[0][8] ==
LEADER
then
if $data[0][4] !=
FOLLOWER
then
if $data[0][8] ==
leader
then
if $data[0][4] !=
follower
then
goto check_vg_ready_1
endi
if $data[0][6] !=
FOLLOWER
then
if $data[0][6] !=
follower
then
goto check_vg_ready_1
endi
goto vg_ready_1
...
...
@@ -390,27 +390,27 @@ system sh/exec.sh -n $dnodeId -s stop -x SIGINT
check_vg_ready_3:
sql show vgroups
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]
if $data[0][4] ==
LEADER
then
if $data[0][6] ==
LEADER
then
if $data[0][4] ==
leader
then
if $data[0][6] ==
leader
then
goto check_vg_ready_3
endi
if $data[0][8] ==
LEADER
then
if $data[0][8] ==
leader
then
goto check_vg_ready_3
endi
print ---- vgroup $data[0][0] leader locating dnode $data[0][5]
elif $data[0][6] ==
LEADER
then
if $data[0][4] ==
LEADER
then
elif $data[0][6] ==
leader
then
if $data[0][4] ==
leader
then
goto check_vg_ready_3
endi
if $data[0][8] ==
LEADER
then
if $data[0][8] ==
leader
then
goto check_vg_ready_3
endi
print ---- vgroup $data[0][0] leader locating dnode $data[0][7]
elif $data[0][8] ==
LEADER
then
if $data[0][4] ==
LEADER
then
elif $data[0][8] ==
leader
then
if $data[0][4] ==
leader
then
goto check_vg_ready_3
endi
if $data[0][6] ==
LEADER
then
if $data[0][6] ==
leader
then
goto check_vg_ready_3
endi
print ---- vgroup $data[0][0] leader locating dnode $data[0][9]
...
...
tests/script/tsim/trans/create_db.sim
浏览文件 @
e35ebdad
...
...
@@ -26,7 +26,7 @@ if $data00 != 1 then
return -1
endi
if $data02 !=
LEADER
then
if $data02 !=
leader
then
return -1
endi
...
...
tests/system-test/0-others/taosdMonitor.py
浏览文件 @
e35ebdad
...
...
@@ -75,7 +75,7 @@ def telemetryInfoCheck(infoDict=''):
if
k
not
in
infoDict
[
"cluster_info"
][
"dnodes"
][
0
]
or
v
!=
infoDict
[
"cluster_info"
][
"dnodes"
][
0
][
k
]
:
tdLog
.
exit
(
"dnodes info is null!"
)
mnodes_info
=
{
"mnode_id"
:
1
,
"mnode_ep"
:
f
"
{
hostname
}
:
{
serverPort
}
"
,
"role"
:
"
LEADER
"
}
mnodes_info
=
{
"mnode_id"
:
1
,
"mnode_ep"
:
f
"
{
hostname
}
:
{
serverPort
}
"
,
"role"
:
"
leader
"
}
for
k
,
v
in
mnodes_info
.
items
():
if
k
not
in
infoDict
[
"cluster_info"
][
"mnodes"
][
0
]
or
v
!=
infoDict
[
"cluster_info"
][
"mnodes"
][
0
][
k
]
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录