Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
0264d83f
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看板
未验证
提交
0264d83f
编写于
7月 28, 2020
作者:
S
Shengliang Guan
提交者:
GitHub
7月 28, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2789 from taosdata/hotfix/test
[TD-1017]
上级
bfceaf20
12dffbc7
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
955 addition
and
4 deletion
+955
-4
packaging/tools/install.sh
packaging/tools/install.sh
+49
-4
tests/script/unique/clusterSimCase/client-01.sim
tests/script/unique/clusterSimCase/client-01.sim
+69
-0
tests/script/unique/clusterSimCase/client-02.sim
tests/script/unique/clusterSimCase/client-02.sim
+68
-0
tests/script/unique/clusterSimCase/client-03.sim
tests/script/unique/clusterSimCase/client-03.sim
+82
-0
tests/script/unique/clusterSimCase/client-04.sim
tests/script/unique/clusterSimCase/client-04.sim
+81
-0
tests/script/unique/clusterSimCase/client-05.sim
tests/script/unique/clusterSimCase/client-05.sim
+86
-0
tests/script/unique/clusterSimCase/client-06.sim
tests/script/unique/clusterSimCase/client-06.sim
+94
-0
tests/script/unique/clusterSimCase/client-07.sim
tests/script/unique/clusterSimCase/client-07.sim
+88
-0
tests/script/unique/clusterSimCase/client-08.sim
tests/script/unique/clusterSimCase/client-08.sim
+93
-0
tests/script/unique/clusterSimCase/cluster_main.sim
tests/script/unique/clusterSimCase/cluster_main.sim
+245
-0
未找到文件。
packaging/tools/install.sh
浏览文件 @
0264d83f
...
@@ -99,6 +99,44 @@ else
...
@@ -99,6 +99,44 @@ else
os_type
=
1
os_type
=
1
fi
fi
# ============================= get input parameters =================================================
# install.sh -v [server | client] -e [yes | no] -i [systemd | service | ...]
# set parameters by default value
interactiveFqdn
=
yes
# [yes | no]
verType
=
server
# [server | client]
initType
=
systemd
# [systemd | service | ...]
while
getopts
"hv:e:i:"
arg
do
case
$arg
in
e
)
#echo "interactiveFqdn=$OPTARG"
interactiveFqdn
=
$(
echo
$OPTARG
)
;;
v
)
#echo "verType=$OPTARG"
verType
=
$(
echo
$OPTARG
)
;;
i
)
#echo "initType=$OPTARG"
initType
=
$(
echo
$OPTARG
)
;;
h
)
echo
"Usage:
`
basename
$0
`
-v [server | client] -e [yes | no]"
exit
0
;;
?
)
#unknow option
echo
"unkonw argument"
exit
1
;;
esac
done
echo
"verType=
${
verType
}
interactiveFqdn=
${
interactiveFqdn
}
"
function
kill_taosd
()
{
function
kill_taosd
()
{
pid
=
$(
ps
-ef
|
grep
"taosd"
|
grep
-v
"grep"
|
awk
'{print $2}'
)
pid
=
$(
ps
-ef
|
grep
"taosd"
|
grep
-v
"grep"
|
awk
'{print $2}'
)
if
[
-n
"
$pid
"
]
;
then
if
[
-n
"
$pid
"
]
;
then
...
@@ -191,6 +229,10 @@ function install_config() {
...
@@ -191,6 +229,10 @@ function install_config() {
if
((
${
update_flag
}
==
1
))
;
then
if
((
${
update_flag
}
==
1
))
;
then
return
0
return
0
fi
fi
if
[
"
$interactiveFqdn
"
==
"no"
]
;
then
return
0
fi
#FQDN_FORMAT="(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)"
#FQDN_FORMAT="(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)"
#FQDN_FORMAT="(:[1-6][0-9][0-9][0-9][0-9]$)"
#FQDN_FORMAT="(:[1-6][0-9][0-9][0-9][0-9]$)"
...
@@ -653,8 +695,8 @@ function install_TDengine() {
...
@@ -653,8 +695,8 @@ function install_TDengine() {
echo
-e
"
${
GREEN_DARK
}
To access TDengine
${
NC
}
: use
${
GREEN_UNDERLINE
}
taos
${
NC
}
in shell OR from
${
GREEN_UNDERLINE
}
http://127.0.0.1:
${
nginx_port
}${
NC
}
"
echo
-e
"
${
GREEN_DARK
}
To access TDengine
${
NC
}
: use
${
GREEN_UNDERLINE
}
taos
${
NC
}
in shell OR from
${
GREEN_UNDERLINE
}
http://127.0.0.1:
${
nginx_port
}${
NC
}
"
else
else
echo
-e
"
${
GREEN_DARK
}
To access TDengine
${
NC
}
: use
${
GREEN_UNDERLINE
}
taos
${
NC
}
in shell
${
NC
}
"
echo
-e
"
${
GREEN_DARK
}
To access TDengine
${
NC
}
: use
${
GREEN_UNDERLINE
}
taos
${
NC
}
in shell
${
NC
}
"
fi
fi
else
else
echo
-e
"
${
GREEN_DARK
}
To access TDengine
${
NC
}
: use
${
GREEN_UNDERLINE
}
taos
${
NC
}
in shell
${
NC
}
"
echo
-e
"
${
GREEN_DARK
}
To access TDengine
${
NC
}
: use
${
GREEN_UNDERLINE
}
taos
${
NC
}
in shell
${
NC
}
"
fi
fi
...
@@ -673,7 +715,7 @@ function install_TDengine() {
...
@@ -673,7 +715,7 @@ function install_TDengine() {
## ==============================Main program starts from here============================
## ==============================Main program starts from here============================
if
[
-z
$1
]
;
then
if
[
"
$verType
"
==
"server"
]
;
then
# Install server and client
# Install server and client
if
[
-x
${
bin_dir
}
/taosd
]
;
then
if
[
-x
${
bin_dir
}
/taosd
]
;
then
update_flag
=
1
update_flag
=
1
...
@@ -681,7 +723,8 @@ if [ -z $1 ]; then
...
@@ -681,7 +723,8 @@ if [ -z $1 ]; then
else
else
install_TDengine
install_TDengine
fi
fi
else
elif
[
"
$verType
"
==
"client"
]
;
then
interactiveFqdn
=
no
# Only install client
# Only install client
if
[
-x
${
bin_dir
}
/taos
]
;
then
if
[
-x
${
bin_dir
}
/taos
]
;
then
update_flag
=
1
update_flag
=
1
...
@@ -689,4 +732,6 @@ else
...
@@ -689,4 +732,6 @@ else
else
else
install_TDengine client
install_TDengine client
fi
fi
else
echo
"please input correct verType"
fi
fi
tests/script/unique/clusterSimCase/client-01.sim
0 → 100644
浏览文件 @
0264d83f
# create database db1
# create table tb ()
# loop insert seq data
###############################################################
################ set script parameters ################
$tblStart = 0
$tblEnd = 10000
$tsStart = 1325347200000 # 2012-01-01 00:00:00.000
$preBinary = ' . client-01-
###############################################################
sql connect
print ================ create db
$db = db
sql create database if not exists $db replica 2
sql use $db
print ================ create table $tb (ts timestamp, c1 int, c2 binary(16))
$i = $tblStart
while $i < $tblEnd
$tb = tb . $i
# print create table if not exists $tb ( ts timestamp , c1 int , c2 binary(16) )
sql create table if not exists $tb ( ts timestamp , c1 int , c2 binary(16) )
$i = $i + 1
endw
$totalRows = 0
$rowsPerTbl = 0
$ts = $tsStart
$rowsPerLoop = 160
$loop_cnt = 0
loop_run:
print ================ client-01 start loop insert data ( loop_cnt: $loop_cnt )
$i = $tblStart
while $i < $tblEnd
$tb = tb . $i
$c2Binary = $preBinary . $i
$c2Binary = $c2Binary . '
$x = 0
while $x < $rowsPerLoop
sql insert into $tb values ( $ts + 0a , $x , $c2Binary ) ( $ts + 2a , $x , $c2Binary ) ( $ts + 4a , $x , $c2Binary ) ( $ts + 6a , $x , $c2Binary ) ( $ts + 8a , $x , $c2Binary ) ( $ts + 10a , $x , $c2Binary ) ( $ts + 12a , $x , $c2Binary ) ( $ts + 14a , $x , $c2Binary ) ( $ts + 16a , $x , $c2Binary ) ( $ts + 18a , $x , $c2Binary ) ( $ts + 20a , $x , $c2Binary ) ( $ts + 22a , $x , $c2Binary ) ( $ts + 24a , $x , $c2Binary ) ( $ts + 26a , $x , $c2Binary ) ( $ts + 28a , $x , $c2Binary ) ( $ts + 30a , $x , $c2Binary ) ( $ts + 32a , $x , $c2Binary ) ( $ts + 34a , $x , $c2Binary ) ( $ts + 36a , $x , $c2Binary ) ( $ts + 38a , $x , $c2Binary )
$x = $x + 20
$ts = $ts + 40a
endw
if $i == $tblStart then
$rowsPerTbl = $rowsPerTbl + $x
endi
$totalRows = $totalRows + $x
$i = $i + 1
endw
sql select count(*) from $tb
if $data00 != $rowsPerTbl then
print data00 $data00 rowsPerTbl $rowsPerTbl
print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
print ************ client-01 insert data error ***** *****
print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
return -1
endi
$loop_cnt = $loop_cnt + 1
goto loop_run
tests/script/unique/clusterSimCase/client-02.sim
0 → 100644
浏览文件 @
0264d83f
# create database db1
# create table tb ()
# loop insert disorder data
###############################################################
################ set script parameters ################
$tblStart = 0
$tblEnd = 10000
$tsStart = 1325347200000 # 2012-01-01 00:00:00.000
$c2Binary = ' . client-02-
###############################################################
sql connect
print ================ create db
$db = db
sql create database if not exists $db replica 2
sql use $db
print ================ create table $tb (ts timestamp, c1 int, c2 binary(16))
$i = $tblStart
while $i < $tblEnd
$tb = tb . $i
# print create table if not exists $tb ( ts timestamp , c1 int , c2 binary(16) )
sql create table if not exists $tb ( ts timestamp , c1 int , c2 binary(16) )
$i = $i + 1
endw
$totalRows = 0
$rowsPerTbl = 0
$ts = $tsStart
$rowsPerLoop = 160
loop_run:
print ================ client-02 start loop insert data
$i = $tblStart
while $i < $tblEnd
$tb = tb . $i
$c2Binary = $c2Binary . $i
$c2Binary = $c2Binary . '
$x = 0
while $x < $rowsPerLoop
sql insert into $tb values ( $ts + 0a , $x , $c2Binary ) ( $ts + 2a , $x , $c2Binary ) ( $ts + 4a , $x , $c2Binary ) ( $ts + 6a , $x , $c2Binary ) ( $ts + 8a , $x , $c2Binary ) ( $ts + 10a , $x , $c2Binary ) ( $ts + 12a , $x , $c2Binary ) ( $ts + 14a , $x , $c2Binary ) ( $ts + 16a , $x , $c2Binary ) ( $ts + 18a , $x , $c2Binary ) ( $ts + 20a , $x , $c2Binary ) ( $ts + 22a , $x , $c2Binary ) ( $ts + 24a , $x , $c2Binary ) ( $ts + 26a , $x , $c2Binary ) ( $ts + 28a , $x , $c2Binary ) ( $ts + 30a , $x , $c2Binary ) ( $ts + 32a , $x , $c2Binary ) ( $ts + 34a , $x , $c2Binary ) ( $ts + 36a , $x , $c2Binary ) ( $ts + 38a , $x , $c2Binary )
sql insert into $tb values ( $ts + 1a , $x , $c2Binary ) ( $ts + 3a , $x , $c2Binary ) ( $ts + 5a , $x , $c2Binary ) ( $ts + 7a , $x , $c2Binary ) ( $ts + 9a , $x , $c2Binary ) ( $ts + 11a , $x , $c2Binary ) ( $ts + 13a , $x , $c2Binary ) ( $ts + 15a , $x , $c2Binary ) ( $ts + 17a , $x , $c2Binary ) ( $ts + 19a , $x , $c2Binary ) ( $ts + 21a , $x , $c2Binary ) ( $ts + 23a , $x , $c2Binary ) ( $ts + 25a , $x , $c2Binary ) ( $ts + 27a , $x , $c2Binary ) ( $ts + 29a , $x , $c2Binary ) ( $ts + 31a , $x , $c2Binary ) ( $ts + 33a , $x , $c2Binary ) ( $ts + 35a , $x , $c2Binary ) ( $ts + 37a , $x , $c2Binary ) ( $ts + 39a , $x , $c2Binary )
$x = $x + 40
$ts = $ts + 40a
if $i == $tblStart then
$rowsPerTbl = $rowsPerTbl + $x
endi
endw
$totalRows = $totalRows + $x
$i = $i + 1
endw
sql select count(*) from $tblStart
if $data00 != $rowsPerTbl then
print data00 $data00 rowsPerTbl $rowsPerTbl
print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
print ************ client-02 insert data error ***** *****
print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
return -1
endi
goto loop_run
tests/script/unique/clusterSimCase/client-03.sim
0 → 100644
浏览文件 @
0264d83f
# create database db1
# create table stb ()
# loop dynamic create sub table and insert disorder data
###############################################################
################ set script parameters ################
$tblStart = 0
$tblEnd = 10000
$tsStart = 1325347200000 # 2012-01-01 00:00:00.000
$c2Binary = ' . client-03-
$t2Binary = ' . client-03-
###############################################################
sql connect
print ================ create db and super-table
$db = db
$stb = stb
sql create database if not exists $db replica 2
sql use $db
sql create table if not exists $stb ( ts timestamp , c1 int , c2 binary(16) ) tags ( t1 int , t2 binary(16) )
#print ================ create table $tb (ts timestamp, c1 int, c2 binary(16))
#$i = $tblStart
#while $i < $tblEnd
# $tb = tb . $i
## print create table if not exists $tb ( ts timestamp , c1 int , c2 binary(16) )
# sql create table if not exists $tb ( ts timestamp , c1 int , c2 binary(16) )
# $i = $i + 1
#endw
$totalRows = 0
$rowsPerTbl = 0
$ts = $tsStart
$rowsPerLoop = 160
loop_run:
print ================ client-03 start loop insert data
$i = $tblStart
while $i < $tblEnd
$tb = tb . $i
$t2Binary = ' . $i
$t2Binary = $t2Binary . '
$c2Binary = $c2Binary . $i
$c2Binary = $c2Binary . '
$x = 0
while $x < $rowsPerLoop
sql insert into $tb using $stb tags ( $i , $t2Binary ) values ( $ts + 0a , $x , $c2Binary ) ( $ts + 2a , $x , $c2Binary ) ( $ts + 4a , $x , $c2Binary ) ( $ts + 6a , $x , $c2Binary ) ( $ts + 8a , $x , $c2Binary ) ( $ts + 10a , $x , $c2Binary ) ( $ts + 12a , $x , $c2Binary ) ( $ts + 14a , $x , $c2Binary ) ( $ts + 16a , $x , $c2Binary ) ( $ts + 18a , $x , $c2Binary ) ( $ts + 20a , $x , $c2Binary ) ( $ts + 22a , $x , $c2Binary ) ( $ts + 24a , $x , $c2Binary ) ( $ts + 26a , $x , $c2Binary ) ( $ts + 28a , $x , $c2Binary ) ( $ts + 30a , $x , $c2Binary ) ( $ts + 32a , $x , $c2Binary ) ( $ts + 34a , $x , $c2Binary ) ( $ts + 36a , $x , $c2Binary ) ( $ts + 38a , $x , $c2Binary )
sql insert into $tb using $stb tags ( $i , $t2Binary ) values ( $ts + 1a , $x , $c2Binary ) ( $ts + 3a , $x , $c2Binary ) ( $ts + 5a , $x , $c2Binary ) ( $ts + 7a , $x , $c2Binary ) ( $ts + 9a , $x , $c2Binary ) ( $ts + 11a , $x , $c2Binary ) ( $ts + 13a , $x , $c2Binary ) ( $ts + 15a , $x , $c2Binary ) ( $ts + 17a , $x , $c2Binary ) ( $ts + 19a , $x , $c2Binary ) ( $ts + 21a , $x , $c2Binary ) ( $ts + 23a , $x , $c2Binary ) ( $ts + 25a , $x , $c2Binary ) ( $ts + 27a , $x , $c2Binary ) ( $ts + 29a , $x , $c2Binary ) ( $ts + 31a , $x , $c2Binary ) ( $ts + 33a , $x , $c2Binary ) ( $ts + 35a , $x , $c2Binary ) ( $ts + 37a , $x , $c2Binary ) ( $ts + 39a , $x , $c2Binary )
$x = $x + 40
$ts = $ts + 40a
if $i == $tblStart then
$rowsPerTbl = $rowsPerTbl + $x
endi
endw
$totalRows = $totalRows + $x
$i = $i + 1
endw
sql select count(*) from $tblStart
if $data00 != $rowsPerTbl then
print data00 $data00 rowsPerTbl $rowsPerTbl
print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
print ****** client-3 insert data into $tblStart error ***
print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
return -1
endi
sql select count(*) from $stb
if $data00 != $totalRows then
print data00 $data00 totalRows $totalRows
print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
print ***** client-3 insert data into $stbl error ********
print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
return -1
endi
goto loop_run
tests/script/unique/clusterSimCase/client-04.sim
0 → 100644
浏览文件 @
0264d83f
# create database db1
# create table tb ()
# loop insert disorder data, drop database, sleep ,
###############################################################
################ set script parameters ################
$tblStart = 0
$tblEnd = 10000
$tsStart = 1325347200000 # 2012-01-01 00:00:00.000
$c2Binary = ' . client-04-
###############################################################
$totalRows = 0
sql connect
init_lable:
print ================ create db
$db = db
sql create database if not exists $db replica 2
sql use $db
print ================ create table $tb (ts timestamp, c1 int, c2 binary(16))
$i = $tblStart
while $i < $tblEnd
$tb = tb . $i
# print create table if not exists $tb ( ts timestamp , c1 int , c2 binary(16) )
sql create table if not exists $tb ( ts timestamp , c1 int , c2 binary(16) )
$i = $i + 1
endw
$rowsPerTbl = 0
$ts = $tsStart
$rowsPerLoop = 160
$loopCnt = 0
loop_run:
print ================ client-04 start loop insert data
$i = $tblStart
while $i < $tblEnd
$tb = tb . $i
$c2Binary = $c2Binary . $i
$c2Binary = $c2Binary . '
$x = 0
while $x < $rowsPerLoop
sql insert into $tb values ( $ts + 0a , $x , $c2Binary ) ( $ts + 2a , $x , $c2Binary ) ( $ts + 4a , $x , $c2Binary ) ( $ts + 6a , $x , $c2Binary ) ( $ts + 8a , $x , $c2Binary ) ( $ts + 10a , $x , $c2Binary ) ( $ts + 12a , $x , $c2Binary ) ( $ts + 14a , $x , $c2Binary ) ( $ts + 16a , $x , $c2Binary ) ( $ts + 18a , $x , $c2Binary ) ( $ts + 20a , $x , $c2Binary ) ( $ts + 22a , $x , $c2Binary ) ( $ts + 24a , $x , $c2Binary ) ( $ts + 26a , $x , $c2Binary ) ( $ts + 28a , $x , $c2Binary ) ( $ts + 30a , $x , $c2Binary ) ( $ts + 32a , $x , $c2Binary ) ( $ts + 34a , $x , $c2Binary ) ( $ts + 36a , $x , $c2Binary ) ( $ts + 38a , $x , $c2Binary )
sql insert into $tb values ( $ts + 1a , $x , $c2Binary ) ( $ts + 3a , $x , $c2Binary ) ( $ts + 5a , $x , $c2Binary ) ( $ts + 7a , $x , $c2Binary ) ( $ts + 9a , $x , $c2Binary ) ( $ts + 11a , $x , $c2Binary ) ( $ts + 13a , $x , $c2Binary ) ( $ts + 15a , $x , $c2Binary ) ( $ts + 17a , $x , $c2Binary ) ( $ts + 19a , $x , $c2Binary ) ( $ts + 21a , $x , $c2Binary ) ( $ts + 23a , $x , $c2Binary ) ( $ts + 25a , $x , $c2Binary ) ( $ts + 27a , $x , $c2Binary ) ( $ts + 29a , $x , $c2Binary ) ( $ts + 31a , $x , $c2Binary ) ( $ts + 33a , $x , $c2Binary ) ( $ts + 35a , $x , $c2Binary ) ( $ts + 37a , $x , $c2Binary ) ( $ts + 39a , $x , $c2Binary )
$x = $x + 40
$ts = $ts + 40a
if $i == $tblStart then
$rowsPerTbl = $rowsPerTbl + $x
endi
endw
$totalRows = $totalRows + $x
$i = $i + 1
endw
sql select count(*) from $tblStart
if $data00 != $rowsPerTbl then
print data00 $data00 rowsPerTbl $rowsPerTbl
print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
print ************ client-04 insert data error ***** *****
print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
return -1
endi
$loopCnt = $loopCnt + 1
if $loopCnt > 100 then
sql drop database if exists $db
sleep 20000
$totalRows = 0
goto init_lable
endi
goto loop_run
tests/script/unique/clusterSimCase/client-05.sim
0 → 100644
浏览文件 @
0264d83f
# create database db1
# loop create table , insert disorder data, drop table, sleep ,
###############################################################
################ set script parameters ################
$tblStart = 0
$tblEnd = 10000
$tsStart = 1325347200000 # 2012-01-01 00:00:00.000
$c2Binary = ' . client-05-
###############################################################
$totalRows = 0
sql connect
print ================ create db
$db = db
sql create database if not exists $db replica 2
sql use $db
init_lable:
print ================ create table $tb (ts timestamp, c1 int, c2 binary(16))
$i = $tblStart
while $i < $tblEnd
$tb = tb . $i
# print create table if not exists $tb ( ts timestamp , c1 int , c2 binary(16) )
sql create table if not exists $tb ( ts timestamp , c1 int , c2 binary(16) )
$i = $i + 1
endw
$rowsPerTbl = 0
$ts = $tsStart
$rowsPerLoop = 160
$loopCnt = 0
loop_run:
print ================ client-05 start loop insert data
$i = $tblStart
while $i < $tblEnd
$tb = tb . $i
$c2Binary = $c2Binary . $i
$c2Binary = $c2Binary . '
$x = 0
while $x < $rowsPerLoop
sql insert into $tb values ( $ts + 0a , $x , $c2Binary ) ( $ts + 2a , $x , $c2Binary ) ( $ts + 4a , $x , $c2Binary ) ( $ts + 6a , $x , $c2Binary ) ( $ts + 8a , $x , $c2Binary ) ( $ts + 10a , $x , $c2Binary ) ( $ts + 12a , $x , $c2Binary ) ( $ts + 14a , $x , $c2Binary ) ( $ts + 16a , $x , $c2Binary ) ( $ts + 18a , $x , $c2Binary ) ( $ts + 20a , $x , $c2Binary ) ( $ts + 22a , $x , $c2Binary ) ( $ts + 24a , $x , $c2Binary ) ( $ts + 26a , $x , $c2Binary ) ( $ts + 28a , $x , $c2Binary ) ( $ts + 30a , $x , $c2Binary ) ( $ts + 32a , $x , $c2Binary ) ( $ts + 34a , $x , $c2Binary ) ( $ts + 36a , $x , $c2Binary ) ( $ts + 38a , $x , $c2Binary )
sql insert into $tb values ( $ts + 1a , $x , $c2Binary ) ( $ts + 3a , $x , $c2Binary ) ( $ts + 5a , $x , $c2Binary ) ( $ts + 7a , $x , $c2Binary ) ( $ts + 9a , $x , $c2Binary ) ( $ts + 11a , $x , $c2Binary ) ( $ts + 13a , $x , $c2Binary ) ( $ts + 15a , $x , $c2Binary ) ( $ts + 17a , $x , $c2Binary ) ( $ts + 19a , $x , $c2Binary ) ( $ts + 21a , $x , $c2Binary ) ( $ts + 23a , $x , $c2Binary ) ( $ts + 25a , $x , $c2Binary ) ( $ts + 27a , $x , $c2Binary ) ( $ts + 29a , $x , $c2Binary ) ( $ts + 31a , $x , $c2Binary ) ( $ts + 33a , $x , $c2Binary ) ( $ts + 35a , $x , $c2Binary ) ( $ts + 37a , $x , $c2Binary ) ( $ts + 39a , $x , $c2Binary )
$x = $x + 40
$ts = $ts + 40a
if $i == $tblStart then
$rowsPerTbl = $rowsPerTbl + $x
endi
endw
$totalRows = $totalRows + $x
$i = $i + 1
endw
sql select count(*) from $tblStart
if $data00 != $rowsPerTbl then
print data00 $data00 rowsPerTbl $rowsPerTbl
print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
print ************ client-05 insert data error ***** *****
print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
return -1
endi
$loopCnt = $loopCnt + 1
if $loopCnt > 100 then
$i = $tblStart
while $i < $tblEnd
$tb = tb . $i
sql drop table if exists $tb
$i = $i + 1
$totalRows = $totalRows - $rowsPerTbl
endw
sleep 20000
goto init_lable
endi
goto loop_run
tests/script/unique/clusterSimCase/client-06.sim
0 → 100644
浏览文件 @
0264d83f
# create database db1
# create table tb ()
# loop insert disorder data, drop some tables and create new tables, sleep ,
###############################################################
################ set script parameters ################
$tblStart = 0
$tblEnd = 10000
$tsStart = 1325347200000 # 2012-01-01 00:00:00.000
$c2Binary = ' . client-06-
$numPerUpdateTbl = 2000
###############################################################
$totalRows = 0
sql connect
print ================ create db
$db = db
sql create database if not exists $db replica 2
sql use $db
init_lable:
print ================ create table $tb (ts timestamp, c1 int, c2 binary(16))
$i = $tblStart
while $i < $tblEnd
$tb = tb . $i
# print create table if not exists $tb ( ts timestamp , c1 int , c2 binary(16) )
sql create table if not exists $tb ( ts timestamp , c1 int , c2 binary(16) )
$i = $i + 1
endw
$dropTblStart = $tblStart
$dropTblEnd = $tblStart + $numPerUpdateTbl
$tblStart = $tblEnd
$tblEnd = $tblEnd + $numPerUpdateTbl
$rowsPerTbl = 0
$ts = $tsStart
$rowsPerLoop = 160
$loopCnt = 0
loop_run:
print ================ client-06 start loop insert data
$i = $dropTblStart
while $i < $tblEnd
$tb = tb . $i
$c2Binary = $c2Binary . $i
$c2Binary = $c2Binary . '
$x = 0
while $x < $rowsPerLoop
sql insert into $tb values ( $ts + 0a , $x , $c2Binary ) ( $ts + 2a , $x , $c2Binary ) ( $ts + 4a , $x , $c2Binary ) ( $ts + 6a , $x , $c2Binary ) ( $ts + 8a , $x , $c2Binary ) ( $ts + 10a , $x , $c2Binary ) ( $ts + 12a , $x , $c2Binary ) ( $ts + 14a , $x , $c2Binary ) ( $ts + 16a , $x , $c2Binary ) ( $ts + 18a , $x , $c2Binary ) ( $ts + 20a , $x , $c2Binary ) ( $ts + 22a , $x , $c2Binary ) ( $ts + 24a , $x , $c2Binary ) ( $ts + 26a , $x , $c2Binary ) ( $ts + 28a , $x , $c2Binary ) ( $ts + 30a , $x , $c2Binary ) ( $ts + 32a , $x , $c2Binary ) ( $ts + 34a , $x , $c2Binary ) ( $ts + 36a , $x , $c2Binary ) ( $ts + 38a , $x , $c2Binary )
sql insert into $tb values ( $ts + 1a , $x , $c2Binary ) ( $ts + 3a , $x , $c2Binary ) ( $ts + 5a , $x , $c2Binary ) ( $ts + 7a , $x , $c2Binary ) ( $ts + 9a , $x , $c2Binary ) ( $ts + 11a , $x , $c2Binary ) ( $ts + 13a , $x , $c2Binary ) ( $ts + 15a , $x , $c2Binary ) ( $ts + 17a , $x , $c2Binary ) ( $ts + 19a , $x , $c2Binary ) ( $ts + 21a , $x , $c2Binary ) ( $ts + 23a , $x , $c2Binary ) ( $ts + 25a , $x , $c2Binary ) ( $ts + 27a , $x , $c2Binary ) ( $ts + 29a , $x , $c2Binary ) ( $ts + 31a , $x , $c2Binary ) ( $ts + 33a , $x , $c2Binary ) ( $ts + 35a , $x , $c2Binary ) ( $ts + 37a , $x , $c2Binary ) ( $ts + 39a , $x , $c2Binary )
$x = $x + 40
$ts = $ts + 40a
if $i == $tblStart then
$rowsPerTbl = $rowsPerTbl + $x
endi
endw
$totalRows = $totalRows + $x
$i = $i + 1
endw
sql select count(*) from $tblStart
if $data00 != $rowsPerTbl then
print data00 $data00 rowsPerTbl $rowsPerTbl
print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
print ************ client-06 insert data error ***** *****
print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
return -1
endi
$loopCnt = $loopCnt + 1
if $loopCnt > 100 then
$i = $dropTblStart
while $i < $dropTblEnd
$tb = tb . $i
sql drop table if exists $tb
$i = $i + 1
$totalRows = $totalRows - $rowsPerTbl
endw
sleep 20000
goto init_lable
endi
goto loop_run
tests/script/unique/clusterSimCase/client-07.sim
0 → 100644
浏览文件 @
0264d83f
# create database db1
# loop create table , insert disorder data, drop table, sleep ,
###############################################################
################ set script parameters ################
$tblStart = 0
$tblEnd = 10000
$tsStart = 1325347200000 # 2012-01-01 00:00:00.000
$c2Binary = ' . client-07-
###############################################################
$totalRows = 0
sql connect
print ================ create db
$db = db
sql create database if not exists $db replica 2
sql use $db
init_lable:
print ================ create table $tb (ts timestamp, c1 int, c2 binary(16))
$i = $tblStart
while $i < $tblEnd
$tb = tb . $i
# print create table if not exists $tb ( ts timestamp , c1 int , c2 binary(16) )
sql create table if not exists $tb ( ts timestamp , c1 int , c2 binary(16) )
$i = $i + 1
endw
$rowsPerTbl = 0
$ts = $tsStart
$rowsPerLoop = 160
$loopCnt = 0
loop_run:
print ================ client-07 start loop insert data
$i = $tblStart
while $i < $tblEnd
$tb = tb . $i
$c2Binary = $c2Binary . $i
$c2Binary = $c2Binary . '
$x = 0
while $x < $rowsPerLoop
sql insert into $tb values ( $ts + 0a , $x , $c2Binary ) ( $ts + 2a , $x , $c2Binary ) ( $ts + 4a , $x , $c2Binary ) ( $ts + 6a , $x , $c2Binary ) ( $ts + 8a , $x , $c2Binary ) ( $ts + 10a , $x , $c2Binary ) ( $ts + 12a , $x , $c2Binary ) ( $ts + 14a , $x , $c2Binary ) ( $ts + 16a , $x , $c2Binary ) ( $ts + 18a , $x , $c2Binary ) ( $ts + 20a , $x , $c2Binary ) ( $ts + 22a , $x , $c2Binary ) ( $ts + 24a , $x , $c2Binary ) ( $ts + 26a , $x , $c2Binary ) ( $ts + 28a , $x , $c2Binary ) ( $ts + 30a , $x , $c2Binary ) ( $ts + 32a , $x , $c2Binary ) ( $ts + 34a , $x , $c2Binary ) ( $ts + 36a , $x , $c2Binary ) ( $ts + 38a , $x , $c2Binary )
sql insert into $tb values ( $ts + 1a , $x , $c2Binary ) ( $ts + 3a , $x , $c2Binary ) ( $ts + 5a , $x , $c2Binary ) ( $ts + 7a , $x , $c2Binary ) ( $ts + 9a , $x , $c2Binary ) ( $ts + 11a , $x , $c2Binary ) ( $ts + 13a , $x , $c2Binary ) ( $ts + 15a , $x , $c2Binary ) ( $ts + 17a , $x , $c2Binary ) ( $ts + 19a , $x , $c2Binary ) ( $ts + 21a , $x , $c2Binary ) ( $ts + 23a , $x , $c2Binary ) ( $ts + 25a , $x , $c2Binary ) ( $ts + 27a , $x , $c2Binary ) ( $ts + 29a , $x , $c2Binary ) ( $ts + 31a , $x , $c2Binary ) ( $ts + 33a , $x , $c2Binary ) ( $ts + 35a , $x , $c2Binary ) ( $ts + 37a , $x , $c2Binary ) ( $ts + 39a , $x , $c2Binary )
$x = $x + 40
$ts = $ts + 40a
if $i == $tblStart then
$rowsPerTbl = $rowsPerTbl + $x
endi
endw
$totalRows = $totalRows + $x
$i = $i + 1
endw
sql select count(*) from $tblStart
if $data00 != $rowsPerTbl then
print data00 $data00 rowsPerTbl $rowsPerTbl
print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
print ************ client-07 insert data error ***** *****
print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
return -1
endi
$loopCnt = $loopCnt + 1
if $loopCnt > 100 then
$i = $tblStart
while $i < $tblEnd
$tb = tb . $i
sql alter table $tb add column c3 double
sql alter table $tb add column c4 binary( 16 )
sql alter table $tb drop column c1
sql alter table $tb drop column c2
$i = $i + 1
endw
sleep 20000
goto init_lable
endi
goto loop_run
tests/script/unique/clusterSimCase/client-08.sim
0 → 100644
浏览文件 @
0264d83f
# create database db1
# create table tb ()
# loop insert disorder data, drop some tables and create new tables, sleep ,
###############################################################
################ set script parameters ################
$tblStart = 0
$tblEnd = 10000
$tsStart = 1325347200000 # 2012-01-01 00:00:00.000
$c2Binary = ' . client-06-
$numPerUpdateTbl = 2000
###############################################################
$totalRows = 0
sql connect
print ================ create db
$db = db
sql create database if not exists $db replica 2
sql use $db
init_lable:
print ================ create table $tb (ts timestamp, c1 int, c2 binary(16))
$i = $tblStart
while $i < $tblEnd
$tb = tb . $i
# print create table if not exists $tb ( ts timestamp , c1 int , c2 binary(16) )
sql create table if not exists $tb ( ts timestamp , c1 int , c2 binary(16) )
$i = $i + 1
endw
$dropTblStart = $tblStart
$dropTblEnd = $tblStart + $numPerUpdateTbl
$tblStart = $tblEnd
$tblEnd = $tblEnd + $numPerUpdateTbl
$rowsPerTbl = 0
$ts = $tsStart
$rowsPerLoop = 40
$loopCnt = 0
loop_run:
print ================ client-06 start loop insert data
$i = $dropTblStart
while $i < $tblEnd
$tb = tb . $i
$c2Binary = $c2Binary . $i
$c2Binary = $c2Binary . '
$x = 0
while $x < $rowsPerLoop
sql insert into $tb values ( $ts + 0a , $x , $c2Binary ) ( $ts + 2a , $x , $c2Binary ) ( $ts + 4a , $x , $c2Binary ) ( $ts + 6a , $x , $c2Binary ) ( $ts + 8a , $x , $c2Binary ) ( $ts + 10a , $x , $c2Binary ) ( $ts + 12a , $x , $c2Binary ) ( $ts + 14a , $x , $c2Binary ) ( $ts + 16a , $x , $c2Binary ) ( $ts + 18a , $x , $c2Binary ) ( $ts + 20a , $x , $c2Binary ) ( $ts + 22a , $x , $c2Binary ) ( $ts + 24a , $x , $c2Binary ) ( $ts + 26a , $x , $c2Binary ) ( $ts + 28a , $x , $c2Binary ) ( $ts + 30a , $x , $c2Binary ) ( $ts + 32a , $x , $c2Binary ) ( $ts + 34a , $x , $c2Binary ) ( $ts + 36a , $x , $c2Binary ) ( $ts + 38a , $x , $c2Binary )
sql insert into $tb values ( $ts + 1a , $x , $c2Binary ) ( $ts + 3a , $x , $c2Binary ) ( $ts + 5a , $x , $c2Binary ) ( $ts + 7a , $x , $c2Binary ) ( $ts + 9a , $x , $c2Binary ) ( $ts + 11a , $x , $c2Binary ) ( $ts + 13a , $x , $c2Binary ) ( $ts + 15a , $x , $c2Binary ) ( $ts + 17a , $x , $c2Binary ) ( $ts + 19a , $x , $c2Binary ) ( $ts + 21a , $x , $c2Binary ) ( $ts + 23a , $x , $c2Binary ) ( $ts + 25a , $x , $c2Binary ) ( $ts + 27a , $x , $c2Binary ) ( $ts + 29a , $x , $c2Binary ) ( $ts + 31a , $x , $c2Binary ) ( $ts + 33a , $x , $c2Binary ) ( $ts + 35a , $x , $c2Binary ) ( $ts + 37a , $x , $c2Binary ) ( $ts + 39a , $x , $c2Binary )
$x = $x + 40
$ts = $ts + 40a
if $i == $tblStart then
$rowsPerTbl = $rowsPerTbl + $x
endi
endw
$totalRows = $totalRows + $x
$i = $i + 1
endw
sql select count(*) from $tblStart
if $data00 != $rowsPerTbl then
print data00 $data00 rowsPerTbl $rowsPerTbl
print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
print ************ client-06 insert data error ***** *****
print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
return -1
endi
$loopCnt = $loopCnt + 1
#if $loopCnt > 100 then
$i = $dropTblStart
while $i < $dropTblEnd
$tb = tb . $i
sql drop table if exists $tb
$i = $i + 1
$totalRows = $totalRows - $rowsPerTbl
endw
sleep 20000
goto init_lable
#endi
goto loop_run
tests/script/unique/clusterSimCase/cluster_main.sim
0 → 100644
浏览文件 @
0264d83f
# scp -r root@114.116.252.220:/home/ubuntu/clusterSimCase unique/.
#taos> show dnodes;
# id | end_point | vnodes | cores | status | role | create_time |
#==================================================================================================================
# 1 | ubuntu-OptiPlex-7060:7100 | 0 | 12 | ready | mnode | 2020-07-22 06:25:31.677 |
# 2 | ubuntu-OptiPlex-7060:7200 | 4 | 12 | ready | vnode | 2020-07-22 06:25:34.795 |
# 3 | ubuntu-OptiPlex-7060:7300 | 4 | 12 | ready | vnode | 2020-07-22 06:25:34.803 |
#Query OK, 3 row(s) in set (0.002448s)
#taos> show vgroups;
# vgId | tables | status | onlineVnodes | dnode | vstatus | dnode | vstatus |
#======================================================================================================
# 2 | 1024 | ready | 2 | 3 | master | 2 | slave |
# 3 | 1024 | ready | 2 | 3 | master | 2 | slave |
# 4 | 1024 | ready | 2 | 3 | master | 2 | slave |
# 5 | 718 | ready | 2 | 3 | master | 2 | slave |
#Query OK, 4 row(s) in set (0.002749s)
#
#taos> show mnodes
# -> ;
# id | end_point | role | create_time |
#=====================================================================================
# 1 | ubuntu-OptiPlex-7060:7100 | master | 2020-07-22 06:25:31.677 |
#Query OK, 1 row(s) in set (0.002126s)
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3
system sh/deploy.sh -n dnode4 -i 4
system sh/cfg.sh -n dnode1 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode2 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode3 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode4 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode1 -c walLevel -v 1
system sh/cfg.sh -n dnode2 -c walLevel -v 1
system sh/cfg.sh -n dnode3 -c walLevel -v 1
system sh/cfg.sh -n dnode4 -c walLevel -v 1
system sh/cfg.sh -n dnode1 -c balanceInterval -v 10
system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 256
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 256
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 256
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 256
#system sh/cfg.sh -n dnode1 -c maxVgroupsPerDb -v 1
#system sh/cfg.sh -n dnode2 -c maxVgroupsPerDb -v 1
#system sh/cfg.sh -n dnode3 -c maxVgroupsPerDb -v 1
#system sh/cfg.sh -n dnode4 -c maxVgroupsPerDb -v 1
#system sh/cfg.sh -n dnode1 -c mnodeEqualVnodeNum -v 256
#system sh/cfg.sh -n dnode2 -c mnodeEqualVnodeNum -v 256
#system sh/cfg.sh -n dnode3 -c mnodeEqualVnodeNum -v 256
#system sh/cfg.sh -n dnode4 -c mnodeEqualVnodeNum -v 256
system sh/cfg.sh -n dnode1 -c role -v 1
system sh/cfg.sh -n dnode2 -c role -v 2
system sh/cfg.sh -n dnode3 -c role -v 2
system sh/cfg.sh -n dnode4 -c role -v 2
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 5000
system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 5000
system sh/cfg.sh -n dnode3 -c maxtablesPerVnode -v 5000
system sh/cfg.sh -n dnode4 -c maxtablesPerVnode -v 5000
system sh/cfg.sh -n dnode1 -c arbitrator -v $arbitrator
system sh/cfg.sh -n dnode2 -c arbitrator -v $arbitrator
system sh/cfg.sh -n dnode3 -c arbitrator -v $arbitrator
system sh/cfg.sh -n dnode4 -c arbitrator -v $arbitrator
print ============== step0: start tarbitrator and dnode1
system sh/exec_tarbitrator.sh -s start
system sh/exec.sh -n dnode1 -s start
print ============== step2: start dnode2/dnode3
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
sleep 1000
sql connect
print ============== step1: add dnode2/dnode3 into cluster
sql create dnode $hostname2
sql create dnode $hostname3
sleep 3000
sleep 3000
print ============== step3: start back client-01.sim
run_back unique/clusterSimCase/client-01.sim
#run_back unique/clusterSimCase/client-01.sim
#run_back unique/clusterSimCase/client-01.sim
#run_back unique/clusterSimCase/client-01.sim
#run_back unique/clusterSimCase/client-01.sim
#run_back unique/clusterSimCase/client-01.sim
#run_back unique/clusterSimCase/client-01.sim
#run_back unique/clusterSimCase/client-01.sim
#run_back unique/clusterSimCase/client-01.sim
#run_back unique/clusterSimCase/client-01.sim
sleep 20000
$db = db
sql use $db
$loop_cnt = 0
loop_cluster_do:
print **** **** **** START loop cluster do (loop_cnt: $loop_cnt )**** **** **** ****
print ============== step4: stop dnode3
system sh/exec.sh -n dnode3 -s stop -x SIGINT
$checkCnt = 0
wait_vgroup_chang_0:
$checkCnt = $checkCnt + 1
if $loopCnt == 10 then
return -1
endi
print show vgroups
sql show vgroups
#if $rows != 4 then
# print rows: $rows
# sleep 2000
# goto wait_vgroup_chang_0
#endi
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$vg2Dnode3Status = $data5_2
$vg2Dnode2Status = $data7_2
if $vg2Dnode3Status != offline then
sleep 2000
goto wait_vgroup_chang_0
endi
if $vg2Dnode2Status != master then
sleep 2000
goto wait_vgroup_chang_0
endi
sleep 3000
print ============== step3: restart dnode3
system sh/exec.sh -n dnode3 -s start
$checkCnt = 0
wait_vgroup_chang_1:
$checkCnt = $checkCnt + 1
if $loopCnt == 10 then
return -1
endi
print show vgroups
sql show vgroups
#if $rows != 4 then
# print rows: $rows
# sleep 2000
# goto wait_vgroup_chang_1
#endi
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$vg2Dnode3Status = $data5_2
$vg2Dnode2Status = $data7_2
if $vg2Dnode3Status != slave then
sleep 2000
goto wait_vgroup_chang_1
endi
if $vg2Dnode2Status != master then
sleep 2000
goto wait_vgroup_chang_1
endi
sleep 3000
print ============== step4: stop dnode2
system sh/exec.sh -n dnode2 -s stop -x SIGINT
$checkCnt = 0
wait_vgroup_chang_2:
$checkCnt = $checkCnt + 1
if $loopCnt == 10 then
return -1
endi
print show vgroups
sql show vgroups
#if $rows != 4 then
# print rows: $rows
# sleep 2000
# goto wait_vgroup_chang_2
#endi
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$vg2Dnode3Status = $data5_2
$vg2Dnode2Status = $data7_2
if $vg2Dnode3Status != master then
sleep 2000
goto wait_vgroup_chang_2
endi
if $vg2Dnode2Status != offline then
sleep 2000
goto wait_vgroup_chang_2
endi
sleep 3000
print ============== step5: restart dnode2
system sh/exec.sh -n dnode2 -s start
$checkCnt = 0
wait_vgroup_chang_3:
$checkCnt = $checkCnt + 1
if $loopCnt == 10 then
return -1
endi
print show vgroups
sql show vgroups
#if $rows != 4 then
# print rows: $rows
# sleep 2000
# goto wait_vgroup_chang_3
#endi
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$vg2Dnode3Status = $data5_2
$vg2Dnode2Status = $data7_2
if $vg2Dnode2Status != slave then
sleep 2000
goto wait_vgroup_chang_3
endi
if $vg2Dnode3Status != master then
sleep 2000
goto wait_vgroup_chang_3
endi
sleep 3000
print **** **** **** (loop_cnt: $loop_cnt ) end, continue...... **** **** **** ****
$loop_cnt = $loop_cnt + 1
goto loop_cluster_do
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录