vnodes.sim 1.2 KB
Newer Older
S
scripts  
Shengliang Guan 已提交
1 2
system sh/stop_dnodes.sh

S
scripts  
Shengliang Guan 已提交
3
$totalVnodes = 10
S
scripts  
Shengliang Guan 已提交
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
$maxTables = 4
$totalRows = $totalVnodes * $maxTables

system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel            -v 0
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode   -v $maxTables
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes    -v $totalVnodes
system sh/cfg.sh -n dnode1 -c maxVnodeConnections -v 100000
system sh/cfg.sh -n dnode1 -c maxMeterConnections -v 100000
system sh/cfg.sh -n dnode1 -c maxShellConns       -v 100000
system sh/cfg.sh -n dnode1 -c maxMgmtConnections  -v 100000

print ==========  prepare data
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect 
sql create database db blocks 2 cache 1 maxTables $maxTables
sql use db

print ==========  step1
sql create table mt (ts timestamp, tbcol int) TAGS(tgcol int)

$x = 0
while $x < $totalRows
  $tb = t . $x
  sql create table $tb using mt tags( $x )
  sql insert into $tb values (now, $x ) 
  $x = $x + 1
endw 

print ========== step2
sql select * from mt
C
changshuaiqiang 已提交
36 37
print $rows
print $totalRows
S
scripts  
Shengliang Guan 已提交
38 39 40 41 42 43 44 45 46 47
if $rows != $totalRows then
  return -1
endi  

sql select count(*) from mt
if $data00 != $totalRows then
  return -1
endi  

system sh/exec.sh -n dnode1 -s stop  -x SIGINT