You need to sign in or sign up before continuing.
offline1.sim 1.8 KB
Newer Older
S
slguan 已提交
1 2
system sh/stop_dnodes.sh

S
slguan 已提交
3 4 5
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3
S
slguan 已提交
6 7 8 9 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

S
slguan 已提交
11 12 13 14
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

S
Shengliang Guan 已提交
15 16 17
system sh/cfg.sh -n dnode1 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode2 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode3 -c mnodeEqualVnodeNum -v 4
S
slguan 已提交
18

S
scripts  
slguan 已提交
19 20 21
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
S
slguan 已提交
22 23

print ========== step1
S
Shengliang Guan 已提交
24
system sh/exec.sh -n dnode1 -s start
S
slguan 已提交
25
sql connect
S
slguan 已提交
26
sql create dnode $hostname2
S
Shengliang Guan 已提交
27
system sh/exec.sh -n dnode2 -s start
S
slguan 已提交
28 29 30
sleep 3000

sql show dnodes
S
slguan 已提交
31 32 33 34
print dnode1 $data4_1
print dnode1 $data4_2

if $data4_1 != ready then
S
slguan 已提交
35 36
  return -1
endi
S
slguan 已提交
37
if $data4_2 != ready then
S
slguan 已提交
38 39 40 41
  return -1
endi

print ========== step2
S
Shengliang Guan 已提交
42
system sh/exec.sh -n dnode2 -s stop -x SIGINT
S
slguan 已提交
43
sleep 8000
S
slguan 已提交
44 45

sql show dnodes
S
slguan 已提交
46 47 48 49
print dnode1 $data4_1
print dnode1 $data4_2

if $data4_1 != ready then
S
slguan 已提交
50 51
  return -1
endi
S
scripts  
Shengliang Guan 已提交
52
if $data4_2 == ready then
S
slguan 已提交
53 54 55 56 57 58 59
  return -1
endi

print ========== step3
sleep 10000

sql show dnodes
S
slguan 已提交
60 61 62 63 64
print dnode1 $data4_1
print dnode1 $data4_2

if $data4_1 != ready then
  return -1
S
slguan 已提交
65
endi
S
scripts  
Shengliang Guan 已提交
66
if $data4_2 != null then
S
slguan 已提交
67
  return -1
S
slguan 已提交
68 69
endi

S
Shengliang Guan 已提交
70 71 72 73 74 75 76 77
system sh/exec.sh -n dnode1 -s stop  -x SIGINT
system sh/exec.sh -n dnode2 -s stop  -x SIGINT
system sh/exec.sh -n dnode3 -s stop  -x SIGINT
system sh/exec.sh -n dnode4 -s stop  -x SIGINT
system sh/exec.sh -n dnode5 -s stop  -x SIGINT
system sh/exec.sh -n dnode6 -s stop  -x SIGINT
system sh/exec.sh -n dnode7 -s stop  -x SIGINT
system sh/exec.sh -n dnode8 -s stop  -x SIGINT