Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dgr6878
TDengine
提交
a2f6d85c
T
TDengine
项目概览
dgr6878
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a2f6d85c
编写于
5月 03, 2020
作者:
S
slguan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add scripts
上级
23303a7d
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
183 addition
and
274 deletion
+183
-274
src/common/inc/tglobal.h
src/common/inc/tglobal.h
+1
-2
src/common/src/tglobal.c
src/common/src/tglobal.c
+3
-4
tests/script/unique/dnode/balance1.sim
tests/script/unique/dnode/balance1.sim
+4
-9
tests/script/unique/dnode/balance3.sim
tests/script/unique/dnode/balance3.sim
+8
-7
tests/script/unique/dnode/balancex.sim
tests/script/unique/dnode/balancex.sim
+25
-37
tests/script/unique/dnode/monitor_bug.sim
tests/script/unique/dnode/monitor_bug.sim
+0
-9
tests/script/unique/dnode/offline1.sim
tests/script/unique/dnode/offline1.sim
+22
-29
tests/script/unique/dnode/offline2.sim
tests/script/unique/dnode/offline2.sim
+32
-28
tests/script/unique/dnode/remove1.sim
tests/script/unique/dnode/remove1.sim
+20
-35
tests/script/unique/dnode/remove2.sim
tests/script/unique/dnode/remove2.sim
+14
-29
tests/script/unique/dnode/testSuite.sim
tests/script/unique/dnode/testSuite.sim
+3
-7
tests/script/unique/dnode/vnode_clean.sim
tests/script/unique/dnode/vnode_clean.sim
+41
-57
tests/script/unique/metrics/balance_replica1.sim
tests/script/unique/metrics/balance_replica1.sim
+2
-4
tests/script/unique/stream/metrics_balance.sim
tests/script/unique/stream/metrics_balance.sim
+2
-4
tests/script/unique/stream/table_balance.sim
tests/script/unique/stream/table_balance.sim
+2
-4
tests/script/unique/stream/table_move.sim
tests/script/unique/stream/table_move.sim
+4
-9
未找到文件。
src/common/inc/tglobal.h
浏览文件 @
a2f6d85c
...
...
@@ -102,8 +102,7 @@ extern int32_t tsMaxMeterConnections;
extern
int32_t
tsMaxVnodeConnections
;
extern
int32_t
tsMaxMgmtConnections
;
extern
int32_t
tsBalanceMonitorInterval
;
extern
int32_t
tsBalanceStartInterval
;
extern
int32_t
tsBalanceInterval
;
extern
int32_t
tsOfflineThreshold
;
extern
int32_t
tsMgmtEqualVnodeNum
;
...
...
src/common/src/tglobal.c
浏览文件 @
a2f6d85c
...
...
@@ -119,9 +119,8 @@ int32_t tsMaxMeterConnections = 10000;
int32_t
tsMaxMgmtConnections
=
2000
;
int32_t
tsMaxVnodeConnections
=
10000
;
int32_t
tsBalanceMonitorInterval
=
2
;
// seconds
int32_t
tsBalanceStartInterval
=
300
;
// seconds
int32_t
tsOfflineThreshold
=
864000
;
// seconds 10days
int32_t
tsBalanceInterval
=
300
;
// seconds
int32_t
tsOfflineThreshold
=
86400
*
100
;
// seconds 10days
int32_t
tsMgmtEqualVnodeNum
=
4
;
int32_t
tsEnableHttpModule
=
1
;
...
...
@@ -406,7 +405,7 @@ static void doInitGlobalConfig() {
taosInitConfigOption
(
cfg
);
cfg
.
option
=
"balanceInterval"
;
cfg
.
ptr
=
&
tsBalance
Start
Interval
;
cfg
.
ptr
=
&
tsBalanceInterval
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT32
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
;
cfg
.
minValue
=
1
;
...
...
tests/script/unique/dnode/balance1.sim
浏览文件 @
a2f6d85c
...
...
@@ -5,15 +5,10 @@ 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 balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode2 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode3 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode4 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode1 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode2 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceStartInterval -v 10
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 mgmtEqualVnodeNum -v 4
system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 4
...
...
tests/script/unique/dnode/balance3.sim
浏览文件 @
a2f6d85c
...
...
@@ -176,20 +176,21 @@ if $data2_5 != 3 then
endi
print ========== step5
sql create dnode $hostname2
system sh/exec_up.sh -n dnode2 -s start
sql create dnode $hostname6
system sh/deploy.sh -n dnode6 -i 6
system sh/exec_up.sh -n dnode6 -s start
$x = 0
show5:
$x = $x + 1
sleep 2000
if $x ==
2
0 then
if $x ==
1
0 then
return -1
endi
sql show dnodes
print dnode1 openVnodes $data2_1
print dnode
2 openVnodes $data2_2
print dnode
6 openVnodes $data2_6
print dnode3 openVnodes $data2_3
print dnode4 openVnodes $data2_4
print dnode5 openVnodes $data2_5
...
...
@@ -197,7 +198,7 @@ print dnode5 openVnodes $data2_5
if $data2_1 != 0 then
goto show5
endi
if $data2_
2
!= 2 then
if $data2_
6
!= 2 then
goto show5
endi
...
...
@@ -216,7 +217,7 @@ show6:
sql show dnodes
print dnode1 openVnodes $data2_1
print dnode
2 openVnodes $data2_2
print dnode
6 openVnodes $data2_6
print dnode3 openVnodes $data2_3
print dnode4 openVnodes $data2_4
print dnode5 openVnodes $data2_5
...
...
@@ -224,7 +225,7 @@ print dnode5 openVnodes $data2_5
if $data2_1 != 0 then
goto show6
endi
if $data2_
2
!= 3 then
if $data2_
6
!= 3 then
goto show6
endi
if $data2_3 != null then
...
...
tests/script/unique/dnode/balancex.sim
浏览文件 @
a2f6d85c
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 balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode2 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode3 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode4 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode1 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode2 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 4
system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 4
system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 4
...
...
@@ -52,8 +37,8 @@ sql insert into d2.t2 values(now+4s, 22)
sql insert into d2.t2 values(now+5s, 21)
sql show dnodes
print dnode1 openVnodes $data
3
_1
if $data
3
_1 != 2 then
print dnode1 openVnodes $data
2
_1
if $data
2
_1 != 2 then
return -1
endi
...
...
@@ -70,12 +55,12 @@ show2:
endi
sql show dnodes
print dnode1 openVnodes $data
3
_1
print dnode2 openVnodes $data
3
_2
if $data
3_1 != 4
then
print dnode1 openVnodes $data
2
_1
print dnode2 openVnodes $data
2
_2
if $data
2_1 != 0
then
goto show2
endi
if $data
3
_2 != 2 then
if $data
2
_2 != 2 then
goto show2
endi
...
...
@@ -96,12 +81,12 @@ show3:
return -1
endi
sql show dnodes
print dnode1 openVnodes $data
3
_1
print dnode2 openVnodes $data
3
_2
if $data
3_1 != 3
then
print dnode1 openVnodes $data
2
_1
print dnode2 openVnodes $data
2
_2
if $data
2_1 != 1
then
goto show3
endi
if $data
3_2 != 1
then
if $data
2_2 != 3
then
goto show3
endi
...
...
@@ -117,16 +102,16 @@ show4:
return -1
endi
sql show dnodes
print dnode1 openVnodes $data
3
_1
print dnode2 openVnodes $data
3
_2
print dnode3 openVnodes $data
3
_3
if $data
3_1 != 4
then
print dnode1 openVnodes $data
2
_1
print dnode2 openVnodes $data
2
_2
print dnode3 openVnodes $data
2
_3
if $data
2_1 != 0
then
goto show4
endi
if $data
3
_2 != 2 then
if $data
2
_2 != 2 then
goto show4
endi
if $data
3
_3 != 2 then
if $data
2
_3 != 2 then
goto show4
endi
...
...
@@ -141,21 +126,24 @@ show5:
return -1
endi
sql show dnodes
print dnode1 openVnodes $data
3
_1
print dnode2 openVnodes $data
3
_2
print dnode3 openVnodes $data
3
_3
if $data
3_1 != 3
then
print dnode1 openVnodes $data
2
_1
print dnode2 openVnodes $data
2
_2
print dnode3 openVnodes $data
2
_3
if $data
2_1 != 1
then
goto show5
endi
if $data
3
_2 != null then
if $data
2
_2 != null then
goto show5
endi
if $data
3_3 != 1
then
if $data
2_3 != 3
then
goto show5
endi
system sh/exec_up.sh -n dnode2 -s stop -x SIGINT
sql reset query cache
sleep 1000
print ========== step6
sql select * from d1.t1 order by t desc
print $data01 $data11 $data21 $data31 $data41
...
...
tests/script/unique/dnode/monitor_bug.sim
浏览文件 @
a2f6d85c
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/cfg.sh -n dnode1 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode2 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode1 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode2 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 4
system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 4
...
...
tests/script/unique/dnode/offline1.sim
浏览文件 @
a2f6d85c
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/cfg.sh -n dnode1 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode2 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode3 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode1 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode2 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode1 -c offlineThreshold -v 10
system sh/cfg.sh -n dnode2 -c offlineThreshold -v 10
system sh/cfg.sh -n dnode3 -c offlineThreshold -v 10
system sh/cfg.sh -n dnode1 -c balanceInterval -v 5
system sh/cfg.sh -n dnode2 -c balanceInterval -v 5
system sh/cfg.sh -n dnode3 -c balanceInterval -v 5
system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 4
system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 4
system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 4
...
...
@@ -36,41 +28,42 @@ system sh/exec_up.sh -n dnode2 -s start
sleep 3000
sql show dnodes
if $data4_192.168.0.1 != ready then
print dnode1 $data4_1
print dnode1 $data4_2
if $data4_1 != ready then
return -1
endi
if $data4_
192.168.0.
2 != ready then
if $data4_2 != ready then
return -1
endi
print ========== step2
system sh/exec_up.sh -n dnode2 -s stop -x SIGINT
sleep
6
000
sleep
8
000
sql show dnodes
if $data4_192.168.0.1 != ready then
print dnode1 $data4_1
print dnode1 $data4_2
if $data4_1 != ready then
return -1
endi
if $data4_
192.168.0.
2 != offline then
if $data4_2 != offline then
return -1
endi
print ========== step3
sleep 10000
$x = 0
show4:
$x = $x + 1
sleep 5000
if $x == 20 then
return -1
endi
sql show dnodes
if $data4_192.168.0.1 != ready then
goto show4
print dnode1 $data4_1
print dnode1 $data4_2
if $data4_1 != ready then
return -1
endi
if $data4_
192.168.0.
2 != null then
goto show4
if $data4_2 != null then
return -1
endi
tests/script/unique/dnode/offline2.sim
浏览文件 @
a2f6d85c
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/cfg.sh -n dnode1 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode2 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode3 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode1 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode2 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode1 -c offlineThreshold -v 10
system sh/cfg.sh -n dnode2 -c offlineThreshold -v 10
system sh/cfg.sh -n dnode3 -c offlineThreshold -v 10
system sh/cfg.sh -n dnode1 -c balanceInterval -v 5
system sh/cfg.sh -n dnode2 -c balanceInterval -v 5
system sh/cfg.sh -n dnode3 -c balanceInterval -v 5
system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 4
system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 4
system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 4
...
...
@@ -40,39 +32,49 @@ sql create table d1.t1(ts timestamp, i int)
sql insert into d1.t1 values(now, 1)
sql show dnodes
if $data4_192.168.0.1 != ready then
print dnode1 $data4_1
print dnode1 $data4_2
if $data4_1 != ready then
return -1
endi
if $data4_
192.168.0.
2 != ready then
if $data4_2 != ready then
return -1
endi
print ========== step2
system sh/exec_up.sh -n dnode2 -s stop -x SIGINT
sleep
5
000
sleep
8
000
sql show dnodes
if $data4_192.168.0.1 != ready then
print dnode1 $data4_1
print dnode1 $data4_2
if $data4_1 != ready then
return -1
endi
if $data4_
192.168.0.
2 != offline then
if $data4_2 != offline then
return -1
endi
print ========== step3
sleep 1
8
000
sleep 1
0
000
sql show dnodes
if $data4_192.168.0.1 != ready then
print dnode1 $data4_1
print dnode1 $data4_2
if $data4_1 != ready then
return -1
endi
if $data4_
192.168.0.2 != offline
then
if $data4_
2 != dropping
then
return -1
endi
print ========== step4
sql create dnode $hostname3
system sh/exec_up.sh -n dnode3 -s start
system sh/exec_up.sh -n dnode2 -s start
sql drop dnode $hostname2
sleep 5000
...
...
@@ -80,23 +82,25 @@ $x = 0
show4:
$x = $x + 1
sleep 5000
if $x ==
2
0 then
if $x ==
5
0 then
return -1
endi
sql show dnodes
if $data4_1
92.168.0.1
!= ready then
return -1
if $data4_1 != ready then
goto show4
endi
if $data4_
192.168.0.
2 != null then
return -1
if $data4_2 != null then
goto show4
endi
if $data4_
192.168.0.
3 != ready then
return -1
if $data4_3 != ready then
goto show4
endi
print ======================== step5
sleep 10000
sql reset query cache
sleep 1000
sql select * from d1.t1
if $rows != 1 then
return -1
...
...
tests/script/unique/dnode/remove1.sim
浏览文件 @
a2f6d85c
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 balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode2 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode3 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode4 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode1 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode2 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 4
system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 4
system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 4
...
...
@@ -52,8 +37,8 @@ sql insert into d2.t2 values(now+4s, 22)
sql insert into d2.t2 values(now+5s, 21)
sql show dnodes
print dnode1 openVnodes $data
3
_1
if $data
3
_1 != 2 then
print dnode1 openVnodes $data
2
_1
if $data
2
_1 != 2 then
return -1
endi
...
...
@@ -79,12 +64,12 @@ show2:
endi
sql show dnodes
print dnode1 openVnodes $data
3
_1
print dnode2 openVnodes $data
3
_2
if $data
3
_1 != 3 then
print dnode1 openVnodes $data
2
_1
print dnode2 openVnodes $data
2
_2
if $data
2
_1 != 3 then
goto show2
endi
if $data
3
_2 != 1 then
if $data
2
_2 != 1 then
goto show2
endi
...
...
@@ -101,8 +86,8 @@ show3:
endi
sql show dnodes
print dnode1 openVnodes $data
3
_1
print dnode2 openVnodes $data
3_2 $data5_192.168.0.
2
print dnode1 openVnodes $data
2
_1
print dnode2 openVnodes $data
2_
2
print ========== step4
sql create dnode $hostname3
...
...
@@ -117,10 +102,10 @@ show4:
endi
sql show dnodes
print dnode1 openVnodes $data
3
_1
print dnode2 openVnodes $data
3
_2
print dnode3 openVnodes $data
3
_3
if $data
3
_2 != null then
print dnode1 openVnodes $data
2
_1
print dnode2 openVnodes $data
2
_2
print dnode3 openVnodes $data
2
_3
if $data
2
_2 != null then
goto show4
endi
...
...
@@ -138,20 +123,20 @@ show5:
return -1
endi
sql show dnodes
print dnode1 openVnodes $data
3
_1
print dnode2 openVnodes $data
3
_2
print dnode3 openVnodes $data
3
_3
print dnode4 openVnodes $data
3
_4
if $data
3
_1 != 4 then
print dnode1 openVnodes $data
2
_1
print dnode2 openVnodes $data
2
_2
print dnode3 openVnodes $data
2
_3
print dnode4 openVnodes $data
2
_4
if $data
2
_1 != 4 then
goto show5
endi
if $data
3
_2 != null then
if $data
2
_2 != null then
goto show5
endi
if $data
3
_3 != 2 then
if $data
2
_3 != 2 then
goto show5
endi
if $data
3
_4 != 2 then
if $data
2
_4 != 2 then
goto show5
endi
...
...
tests/script/unique/dnode/remove2.sim
浏览文件 @
a2f6d85c
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 balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode2 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode3 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode4 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode1 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode2 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 4
system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 4
system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 4
...
...
@@ -52,8 +37,8 @@ sql insert into d2.t2 values(now+4s, 22)
sql insert into d2.t2 values(now+5s, 21)
sql show dnodes
print dnode1 openVnodes $data
3
_1
if $data
3
_1 != 2 then
print dnode1 openVnodes $data
2
_1
if $data
2
_1 != 2 then
return -1
endi
...
...
@@ -79,12 +64,12 @@ show2:
endi
sql show dnodes
print dnode1 openVnodes $data
3
_1
print dnode2 openVnodes $data
3
_2
if $data
3
_1 != 3 then
print dnode1 openVnodes $data
2
_1
print dnode2 openVnodes $data
2
_2
if $data
2
_1 != 3 then
goto show2
endi
if $data
3
_2 != 1 then
if $data
2
_2 != 1 then
goto show2
endi
...
...
@@ -102,8 +87,8 @@ show3:
endi
sql show dnodes
print dnode1 openVnodes $data
3
_1
print dnode2 openVnodes $data
3
_2 $data5_192.168.0.2
print dnode1 openVnodes $data
2
_1
print dnode2 openVnodes $data
2
_2 $data5_192.168.0.2
print ========== step4
sql create dnode $hostname3
...
...
@@ -118,16 +103,16 @@ show4:
endi
sql show dnodes
print dnode1 openVnodes $data
3
_1
print dnode2 openVnodes $data
3
_2
print dnode3 openVnodes $data
3
_3
if $data
3
_2 != null then
print dnode1 openVnodes $data
2
_1
print dnode2 openVnodes $data
2
_2
print dnode3 openVnodes $data
2
_3
if $data
2
_2 != null then
goto show4
endi
if $data
3
_1 != 3 then
if $data
2
_1 != 3 then
goto show4
endi
if $data
3
_3 != 1 then
if $data
2
_3 != 1 then
goto show4
endi
...
...
tests/script/unique/dnode/testSuite.sim
浏览文件 @
a2f6d85c
...
...
@@ -4,10 +4,6 @@ run unique/dnode/balance3.sim
run unique/dnode/balancex.sim
run unique/dnode/offline1.sim
run unique/dnode/offline2.sim
run unique/dnode/remove1.sim
run unique/dnode/remove2.sim
run unique/dnode/vnode_clean.sim
#run unique/dnode/remove1.sim
#run unique/dnode/remove2.sim
#run unique/dnode/vnode_clean.sim
tests/script/unique/dnode/vnode_clean.sim
浏览文件 @
a2f6d85c
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 balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode2 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode3 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode4 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode1 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode2 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 4
system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 4
system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 4
...
...
@@ -43,8 +28,8 @@ sql insert into d1.t1 values(now+4s, 12)
sql insert into d1.t1 values(now+5s, 11)
sql show dnodes
print dnode1 openVnodes $data
3
_1
if $data
3
_1 != 3 then
print dnode1 openVnodes $data
2
_1
if $data
2
_1 != 3 then
return -1
endi
...
...
@@ -60,12 +45,12 @@ show2:
return -1
endi
sql show dnodes
print dnode1 openVnodes $data
3
_1
print dnode2 openVnodes $data
3
_2
if $data
3
_1 != 4 then
print dnode1 openVnodes $data
2
_1
print dnode2 openVnodes $data
2
_2
if $data
2
_1 != 4 then
goto show2
endi
if $data
3
_2 != 3 then
if $data
2
_2 != 3 then
goto show2
endi
...
...
@@ -81,12 +66,12 @@ sql insert into d2.t2 values(now+5s, 21)
$x = 0
sql show dnodes
print dnode1 openVnodes $data
3
_1
print dnode2 openVnodes $data
3
_2
if $data
3
_1 != 4 then
print dnode1 openVnodes $data
2
_1
print dnode2 openVnodes $data
2
_2
if $data
2
_1 != 4 then
return -1
endi
if $data
3
_2 != 2 then
if $data
2
_2 != 2 then
return -1
endi
...
...
@@ -101,12 +86,12 @@ show4:
return -1
endi
sql show dnodes
print dnode1 openVnodes $data
3
_1
print dnode2 openVnodes $data
3
_2
if $data
3
_1 != 2 then
print dnode1 openVnodes $data
2
_1
print dnode2 openVnodes $data
2
_2
if $data
2
_1 != 2 then
goto show4
endi
if $data
3
_2 != null then
if $data
2
_2 != null then
goto show4
endi
if $rows != 1 then
...
...
@@ -120,8 +105,7 @@ sleep 2000
sql create dnode $hostname2
system sh/deploy.sh -n dnode2 -i 2
system sh/cfg.sh -n dnode2 -c numOfMPeers -v 1
system sh/cfg.sh -n dnode2 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode2 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 4
system sh/cfg.sh -n dnode2 -c clog -v 1
system sh/exec_up.sh -n dnode2 -s start
...
...
@@ -134,12 +118,12 @@ show5:
return -1
endi
sql show dnodes
print dnode1 openVnodes $data
3
_1
print dnode2 openVnodes $data
3
_2
if $data
3
_1 != 4 then
print dnode1 openVnodes $data
2
_1
print dnode2 openVnodes $data
2
_2
if $data
2
_1 != 4 then
goto show5
endi
if $data
3
_2 != 2 then
if $data
2
_2 != 2 then
goto show5
endi
...
...
@@ -153,12 +137,12 @@ sql insert into d3.t3 values(now+4s, 32)
sql insert into d3.t3 values(now+5s, 31)
sql show dnodes
print dnode1 openVnodes $data
3
_1
print dnode2 openVnodes $data
3
_2
if $data
3
_1 != 4 then
print dnode1 openVnodes $data
2
_1
print dnode2 openVnodes $data
2
_2
if $data
2
_1 != 4 then
return -1
endi
if $data
3
_2 != 1 then
if $data
2
_2 != 1 then
return -1
endi
...
...
@@ -175,16 +159,16 @@ show7:
endi
sql show dnodes
print dnode1 openVnodes $data
3
_1
print dnode2 openVnodes $data
3
_2
print dnode3 openVnodes $data
3
_3
if $data
3
_1 != 4 then
print dnode1 openVnodes $data
2
_1
print dnode2 openVnodes $data
2
_2
print dnode3 openVnodes $data
2
_3
if $data
2
_1 != 4 then
goto show7
endi
if $data
3
_2 != 2 then
if $data
2
_2 != 2 then
goto show7
endi
if $data
3
_3 != 3 then
if $data
2
_3 != 3 then
goto show7
endi
...
...
@@ -205,16 +189,16 @@ show8:
return -1
endi
sql show dnodes
print dnode1 openVnodes $data
3
_1
print dnode2 openVnodes $data
3
_2
print dnode3 openVnodes $data
3
_3
if $data
3
_1 != 4 then
print dnode1 openVnodes $data
2
_1
print dnode2 openVnodes $data
2
_2
print dnode3 openVnodes $data
2
_3
if $data
2
_1 != 4 then
goto show8
endi
if $data
3
_2 != 2 then
if $data
2
_2 != 2 then
goto show8
endi
if $data
3
_3 != 2 then
if $data
2
_3 != 2 then
goto show8
endi
...
...
@@ -230,16 +214,16 @@ show9:
endi
sql show dnodes
print dnode1 openVnodes $data
3
_1
print dnode2 openVnodes $data
3
_2
print dnode3 openVnodes $data
3
_3
if $data
3
_1 != 4 then
print dnode1 openVnodes $data
2
_1
print dnode2 openVnodes $data
2
_2
print dnode3 openVnodes $data
2
_3
if $data
2
_1 != 4 then
goto show9
endi
if $data
3
_2 != null then
if $data
2
_2 != null then
goto show9
endi
if $data
3
_3 != 0 then
if $data
2
_3 != 0 then
goto show9
endi
...
...
tests/script/unique/metrics/balance_replica1.sim
浏览文件 @
a2f6d85c
...
...
@@ -8,10 +8,8 @@ system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c statusInterval -v 1
system sh/cfg.sh -n dnode2 -c statusInterval -v 1
system sh/cfg.sh -n dnode1 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode2 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode1 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode2 -c balanceStartInterval -v 10
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 dnode1 -c commitLog -v 0
system sh/cfg.sh -n dnode2 -c commitLog -v 0
system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 0
...
...
tests/script/unique/stream/metrics_balance.sim
浏览文件 @
a2f6d85c
...
...
@@ -8,10 +8,8 @@ system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c statusInterval -v 1
system sh/cfg.sh -n dnode2 -c statusInterval -v 1
system sh/cfg.sh -n dnode1 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode2 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode1 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode2 -c balanceStartInterval -v 10
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 dnode1 -c commitLog -v 0
system sh/cfg.sh -n dnode2 -c commitLog -v 0
system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 0
...
...
tests/script/unique/stream/table_balance.sim
浏览文件 @
a2f6d85c
...
...
@@ -8,10 +8,8 @@ system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c statusInterval -v 1
system sh/cfg.sh -n dnode2 -c statusInterval -v 1
system sh/cfg.sh -n dnode1 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode2 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode1 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode2 -c balanceStartInterval -v 10
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 dnode1 -c commitLog -v 0
system sh/cfg.sh -n dnode2 -c commitLog -v 0
system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 0
...
...
tests/script/unique/stream/table_move.sim
浏览文件 @
a2f6d85c
...
...
@@ -20,15 +20,10 @@ system sh/cfg.sh -n dnode2 -c statusInterval -v 1
system sh/cfg.sh -n dnode3 -c statusInterval -v 1
system sh/cfg.sh -n dnode4 -c statusInterval -v 1
system sh/cfg.sh -n dnode1 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode2 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode3 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode4 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode1 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode2 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceStartInterval -v 10
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 clog -v 1
system sh/cfg.sh -n dnode2 -c clog -v 1
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录