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
$maxTables = 4
$totalRows = $totalVnodes * $maxTables

system sh/deploy.sh -n dnode1 -i 1
8
system sh/cfg.sh -n dnode1 -c walLevel            -v 1
S
scripts  
Shengliang Guan 已提交
9 10
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode   -v $maxTables
system sh/cfg.sh -n dnode1 -c maxVgroupsPerDb     -v $totalVnodes
S
scripts  
Shengliang Guan 已提交
11 12 13 14 15 16 17
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
H
Haojun Liao 已提交
18
sleep 2000
S
scripts  
Shengliang Guan 已提交
19
sql connect 
H
Hongze Cheng 已提交
20
sql create database db blocks 3 cache 1
S
scripts  
Shengliang Guan 已提交
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
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
if $rows != $totalRows then
  return -1
endi  

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

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