delete_reusevnode.sim 2.5 KB
Newer Older
S
slguan 已提交
1
system sh/stop_dnodes.sh
S
slguan 已提交
2 3

system sh/deploy.sh -n dnode1 -i 1
S
slguan 已提交
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 10
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 10
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 10
system sh/cfg.sh -n dnode1 -c cacheBlockSize -v 200
system sh/cfg.sh -n dnode2 -c cacheBlockSize -v 200
system sh/cfg.sh -n dnode3 -c cacheBlockSize -v 200

print ========= start dnodes
system sh/exec.sh -n dnode1 -s start
sleep 3000

print ======== step1 

$tbPrefix = t
$i = 0
while $i < 1000
  $db = db . $i
  sql create database $db
  sql use $db

  $tb = $tbPrefix . $i
  sql create table $tb (ts timestamp, i int);

  sql insert into $tb values(now, 1);

  sleep 1000
  sql drop database $db

  print times $i
  $i = $i + 1

endw 

print ======== step2
sleep 1000
sql drop database $db
sql show databases
if $rows != 0 then 
  return -1
endi 


system sh/stop_dnodes.sh
S
slguan 已提交
48 49

system sh/deploy.sh -n dnode1 -i 1
S
slguan 已提交
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67

system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 10
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 10
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 10
system sh/cfg.sh -n dnode1 -c cacheBlockSize -v 200
system sh/cfg.sh -n dnode2 -c cacheBlockSize -v 200
system sh/cfg.sh -n dnode3 -c cacheBlockSize -v 200

print ========= start dnodes
system sh/exec.sh -n dnode1 -s start
sleep 3000

print ======== step1

$tbPrefix = t
$i = 0
while $i < 1000
  $db = db . $i
S
scripts  
slguan 已提交
68
  sql create database $db maxTables 4
S
slguan 已提交
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
  sql use $db

  sql create table st (ts timesetamp, i int) tags(j int);
  $tb = $tbPrefix . $i
  $tb = $tb . a

    $tb1 = $tb . 1
    sql create table $tb1 using st tags(1)
    sql insert into  $tb1 values(now, 1);

    $tb1 = $tb . 2
    sql create table $tb1 using st tags(1)
    sql insert into  $tb1 values(now, 1);

    $tb1 = $tb . 3
    sql create table $tb1 using st tags(1)
    sql insert into  $tb1 values(now, 1);

    $tb1 = $tb . 5
    sql create table $tb1 using st tags(1)
    sql insert into  $tb1 values(now, 1);

    $tb1 = $tb . 5
    sql create table $tb1 using st tags(1)
    sql insert into  $tb1 values(now, 1);

    $tb1 = $tb . 6
    sql create table $tb1 using st tags(1)
    sql insert into  $tb1 values(now, 1);

    $tb1 = $tb . 7
    sql create table $tb1 using st tags(1)
    sql insert into  $tb1 values(now, 1);

    $tb1 = $tb . 8
    sql create table $tb1 using st tags(1)
    sql insert into  $tb1 values(now, 1);

  sleep 1000
  sql drop database $db

  print times $i
  $i = $i + 1

endw

print ======== step2
sleep 1000
sql drop database $db
sql show databases
if $rows != 0 then
  return -1
endi