delete_part.sim 2.3 KB
Newer Older
S
slguan 已提交
1
system sh/stop_dnodes.sh
S
slguan 已提交
2 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
system sh/deploy.sh -n dnode4 -i 4
S
slguan 已提交
6

S
scripts  
slguan 已提交
7 8 9 10
system sh/cfg.sh -n dnode1 -c wallevel -v 2
system sh/cfg.sh -n dnode2 -c wallevel -v 2
system sh/cfg.sh -n dnode3 -c wallevel -v 2
system sh/cfg.sh -n dnode4 -c wallevel -v 2
S
slguan 已提交
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26

system sh/cfg.sh -n dnode1 -c numOfMPeers -v 1
system sh/cfg.sh -n dnode2 -c numOfMPeers -v 1
system sh/cfg.sh -n dnode3 -c numOfMPeers -v 1
system sh/cfg.sh -n dnode4 -c numOfMPeers -v 1

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
system sh/cfg.sh -n dnode4 -c mgmtEqualVnodeNum -v 4

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 dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4

S
scripts  
slguan 已提交
27 28 29 30
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode3 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode4 -c maxtablesPerVnode -v 4
S
slguan 已提交
31 32

print ========= start dnodes
S
slguan 已提交
33
system sh/exec_up.sh -n dnode1 -s start
S
scripts  
Shengliang Guan 已提交
34
sleep 3000
S
slguan 已提交
35
sql connect
S
slguan 已提交
36
sql create dnode $hostname2
S
slguan 已提交
37
system sh/exec_up.sh -n dnode2 -s start
S
slguan 已提交
38 39 40 41 42 43

$loop = 0
begin:

    $db = db . $loop
	
S
scripts  
Shengliang Guan 已提交
44
	print ======== step1 $loop
S
slguan 已提交
45 46 47 48 49 50 51 52 53 54 55
	sql create database $db
	sql use $db
	
	$x = 0
	while $x < 32
	  $tb = tb . $x
	  sql create table $tb (ts timestamp, i int)
	  sql insert into $tb values(now, $x )
	  $x = $x + 1
	endw

S
scripts  
Shengliang Guan 已提交
56
	print ======== step2 $loop
S
slguan 已提交
57
	system sh/exec_up.sh -n dnode2 -s stop
S
scripts  
Shengliang Guan 已提交
58
	sleep 1000
S
slguan 已提交
59 60 61
	sql drop database $db 

	
S
scripts  
Shengliang Guan 已提交
62
	print ======== step3 $loop
S
slguan 已提交
63
	sleep 3000
S
slguan 已提交
64
	system sh/exec_up.sh -n dnode2 -s start
S
scripts  
Shengliang Guan 已提交
65
	sleep 5000
S
slguan 已提交
66 67 68 69 70 71 72
	
	print ===> test times : $loop
    if $loop > 5 then	  
	  return 0
	endi

	$loop = $loop + 1
S
scripts  
Shengliang Guan 已提交
73 74 75

	sql reset query cache
	sleep 1000
S
slguan 已提交
76 77 78
	
goto begin
  
guanshengliang's avatar
scripts  
guanshengliang 已提交
79 80 81 82 83 84 85 86
system sh/exec_up.sh -n dnode1 -s stop  -x SIGINT
system sh/exec_up.sh -n dnode2 -s stop  -x SIGINT
system sh/exec_up.sh -n dnode3 -s stop  -x SIGINT
system sh/exec_up.sh -n dnode4 -s stop  -x SIGINT
system sh/exec_up.sh -n dnode5 -s stop  -x SIGINT
system sh/exec_up.sh -n dnode6 -s stop  -x SIGINT
system sh/exec_up.sh -n dnode7 -s stop  -x SIGINT
system sh/exec_up.sh -n dnode8 -s stop  -x SIGINT