balance2.sim 13.6 KB
Newer Older
S
slguan 已提交
1
system sh/stop_dnodes.sh
S
slguan 已提交
2 3 4 5 6 7 8 9
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
system sh/deploy.sh -n dnode5 -i 5
system sh/deploy.sh -n dnode6 -i 6
system sh/deploy.sh -n dnode7 -i 7
system sh/deploy.sh -n dnode8 -i 8
S
slguan 已提交
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 48

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
system sh/cfg.sh -n dnode5 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode6 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode7 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode8 -c numOfTotalVnodes -v 4

system sh/cfg.sh -n dnode1 -c numOfMPeers -v 3
system sh/cfg.sh -n dnode2 -c numOfMPeers -v 3
system sh/cfg.sh -n dnode3 -c numOfMPeers -v 3
system sh/cfg.sh -n dnode4 -c numOfMPeers -v 3
system sh/cfg.sh -n dnode5 -c numOfMPeers -v 3
system sh/cfg.sh -n dnode6 -c numOfMPeers -v 3
system sh/cfg.sh -n dnode7 -c numOfMPeers -v 3
system sh/cfg.sh -n dnode8 -c numOfMPeers -v 3

system sh/cfg.sh -n dnode1 -c clog -v 1
system sh/cfg.sh -n dnode2 -c clog -v 1
system sh/cfg.sh -n dnode3 -c clog -v 1
system sh/cfg.sh -n dnode4 -c clog -v 1
system sh/cfg.sh -n dnode5 -c clog -v 1
system sh/cfg.sh -n dnode6 -c clog -v 1
system sh/cfg.sh -n dnode7 -c clog -v 1
system sh/cfg.sh -n dnode8 -c clog -v 1

system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 0
system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 0
system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 0
system sh/cfg.sh -n dnode4 -c mgmtEqualVnodeNum -v 0
system sh/cfg.sh -n dnode5 -c mgmtEqualVnodeNum -v 0
system sh/cfg.sh -n dnode6 -c mgmtEqualVnodeNum -v 0
system sh/cfg.sh -n dnode7 -c mgmtEqualVnodeNum -v 0
system sh/cfg.sh -n dnode8 -c mgmtEqualVnodeNum -v 0

print ============== step1
print ========= start dnode1
S
scripts  
slguan 已提交
49
system sh/exec_up.sh -n dnode1 -s start
S
slguan 已提交
50 51 52

sql connect
sleep 4001
S
slguan 已提交
53 54
sql create dnode $hostname2
sql create dnode $hostname3
S
scripts  
slguan 已提交
55 56
system sh/exec_up.sh -n dnode2 -s start
system sh/exec_up.sh -n dnode3 -s start
S
slguan 已提交
57 58 59 60 61 62 63 64 65 66 67 68 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
sleep 4001

sql create database c_b2_d1 replica 2 tables 4
sql use c_b2_d1
sql create table c_b2_t1 (t timestamp, i int)
sql insert into c_b2_t1 values(1520000020015, 15)
sql insert into c_b2_t1 values(1520000021014, 14)
sql insert into c_b2_t1 values(1520000022013, 13)
sql insert into c_b2_t1 values(1520000023012, 12)
sql insert into c_b2_t1 values(1520000024011, 11)

sql create database c_b2_d2 replica 2 tables 4
sql use c_b2_d2
sql create table c_b2_t2 (t timestamp, i int)
sql insert into c_b2_t2 values(1520000020025, 25)
sql insert into c_b2_t2 values(1520000021024, 24)
sql insert into c_b2_t2 values(1520000022023, 23)
sql insert into c_b2_t2 values(1520000023022, 22)
sql insert into c_b2_t2 values(1520000024021, 21)

sql create database c_b2_d3 replica 2 tables 4
sql use c_b2_d3
sql create table c_b2_t3 (t timestamp, i int)
sql insert into c_b2_t3 values(1520000020035, 35)
sql insert into c_b2_t3 values(1520000021034, 34)
sql insert into c_b2_t3 values(1520000022033, 33)
sql insert into c_b2_t3 values(1520000023032, 32)
sql insert into c_b2_t3 values(1520000024031, 31)

$x = 0
show1: 
	$x = $x + 1
	sleep 3000
	if $x == 20 then 
	  return -1
	endi
sql show dnodes -x show1
S
scripts  
slguan 已提交
94
$dnode1Vnodes = $data2_1
S
slguan 已提交
95
print dnode1 $dnode1Vnodes
S
scripts  
slguan 已提交
96
$dnode2Vnodes = $data2_2
S
slguan 已提交
97
print dnode2 $dnode2Vnodes
S
scripts  
slguan 已提交
98
$dnode3Vnodes = $data2_3
S
slguan 已提交
99
print dnode3 $dnode3Vnodes
S
slguan 已提交
100 101 102 103 104 105 106 107 108 109 110 111 112

if $dnode1Vnodes != 2 then
  goto show1
endi
if $dnode2Vnodes != 2 then
  goto show1
endi
if $dnode3Vnodes != 2 then
  goto show1
endi

print ============================== step2
print ========= drop dnode2
S
slguan 已提交
113
sql drop dnode $hostname2
S
slguan 已提交
114 115 116 117 118 119 120 121 122 123
sleep 9000

$x = 0
show2: 
	$x = $x + 1
	sleep 3000
	if $x == 20 then 
	  return -1
	endi
sql show dnodes -x show2
S
scripts  
slguan 已提交
124
$dnode1Vnodes = $data2_1
S
slguan 已提交
125
print dnode1 $dnode1Vnodes
S
scripts  
slguan 已提交
126
$dnode2Vnodes = $data2_2
S
slguan 已提交
127
print dnode2 $dnode2Vnodes
S
scripts  
slguan 已提交
128
$dnode3Vnodes = $data2_3
S
slguan 已提交
129
print dnode3 $dnode3Vnodes
S
slguan 已提交
130

S
scripts  
slguan 已提交
131
if $dnode1Vnodes != 3 then
S
slguan 已提交
132 133 134 135 136
  goto show2
endi
if $dnode2Vnodes != null then
  goto show2
endi
S
scripts  
slguan 已提交
137
if $dnode3Vnodes != 3 then
S
slguan 已提交
138 139 140 141
  goto show2
endi

sql show mnodes
S
scripts  
slguan 已提交
142 143 144 145
$dnode1Role = $data2_1
$dnode2Role = $data2_2
$dnode3Role = $data2_3
$dnode4Role = $data2_4
S
slguan 已提交
146 147 148 149
print dnode1 ==> $dnode1Role
print dnode2 ==> $dnode2Role
print dnode3 ==> $dnode3Role
print dnode4 ==> $dnode4Role
S
slguan 已提交
150

S
scripts  
slguan 已提交
151
system sh/exec_up.sh -n dnode2 -s stop  -x SIGINT
S
slguan 已提交
152 153

print ============================== step3
S
scripts  
slguan 已提交
154 155 156
print ========= start dnode4
sql create dnode $hostname4
system sh/exec_up.sh -n dnode4 -s start
S
slguan 已提交
157 158 159 160 161 162 163 164 165 166
sleep 10000

$x = 0
show3: 
	$x = $x + 1
	sleep 3000
	if $x == 20 then 
	  return -1
	endi
sql show dnodes -x show3
S
scripts  
slguan 已提交
167
$dnode1Vnodes = $data2_1
S
slguan 已提交
168
print dnode1 $dnode1Vnodes
S
scripts  
slguan 已提交
169 170
$dnode4Vnodes = $data2_4
print dnode4 $dnode4Vnodes
S
scripts  
slguan 已提交
171
$dnode3Vnodes = $data2_3
S
slguan 已提交
172
print dnode3 $dnode3Vnodes
S
slguan 已提交
173 174 175 176

if $dnode1Vnodes != 2 then
  goto show3
endi
S
scripts  
slguan 已提交
177
if $dnode4Vnodes != 2 then
S
slguan 已提交
178 179 180 181 182 183 184
  goto show3
endi
if $dnode3Vnodes != 2 then
  goto show3
endi

sql show mnodes
S
scripts  
slguan 已提交
185 186 187 188
$dnode1Role = $data2_1
$dnode2Role = $data2_2
$dnode3Role = $data2_3
$dnode4Role = $data2_4
S
slguan 已提交
189 190 191 192
print dnode1 ==> $dnode1Role
print dnode2 ==> $dnode2Role
print dnode3 ==> $dnode3Role
print dnode4 ==> $dnode4Role
S
slguan 已提交
193

S
scripts  
slguan 已提交
194 195 196 197 198 199 200 201 202 203 204 205 206 207
if $dnode1Role != master then
  return -1
endi
if $dnode2Role != null then
  return -1
endi
if $dnode3Role != slave then
  return -1
endi

if $dnode4Role != slave then
  return -1
endi

S
slguan 已提交
208 209
print ============================== step4
print ========= drop dnode3
S
slguan 已提交
210
sql drop dnode $hostname3
S
slguan 已提交
211 212 213 214 215 216 217 218 219 220
sleep 9000

$x = 0
show4: 
	$x = $x + 1
	sleep 3000
	if $x == 20 then 
	  return -1
	endi
sql show dnodes -x show4
S
scripts  
slguan 已提交
221
$dnode1Vnodes = $data2_1
S
slguan 已提交
222
print dnode1 $dnode1Vnodes
S
scripts  
slguan 已提交
223 224
$dnode4Vnodes = $data2_4
print dnode4 $dnode4Vnodes
S
scripts  
slguan 已提交
225
$dnode3Vnodes = $data2_3
S
slguan 已提交
226
print dnode3 $dnode3Vnodes
S
slguan 已提交
227

S
scripts  
slguan 已提交
228
if $dnode1Vnodes != 3 then
S
slguan 已提交
229 230
  goto show4
endi
S
scripts  
slguan 已提交
231
if $dnode4Vnodes != 3 then
S
slguan 已提交
232 233 234 235 236 237 238
  goto show4
endi
if $dnode3Vnodes != null then
  goto show4
endi

sql show mnodes
S
scripts  
slguan 已提交
239 240 241 242
$dnode1Role = $data2_1
$dnode2Role = $data2_2
$dnode3Role = $data2_3
$dnode4Role = $data2_4
S
slguan 已提交
243 244 245 246
print dnode1 ==> $dnode1Role
print dnode2 ==> $dnode2Role
print dnode3 ==> $dnode3Role
print dnode4 ==> $dnode4Role
S
slguan 已提交
247

S
scripts  
slguan 已提交
248 249 250 251 252 253 254 255 256 257 258 259 260 261
if $dnode1Role != master then
  return -1
endi
if $dnode2Role != null then
  return -1
endi
if $dnode3Role != null then
  return -1
endi

if $dnode4Role != slave then
  return -1
endi

S
scripts  
slguan 已提交
262
system sh/exec_up.sh -n dnode3 -s stop  -x SIGINT
S
slguan 已提交
263 264 265

print ============================== step5
print ========= start dnode3
S
scripts  
slguan 已提交
266 267
sql create dnode $hostname5
system sh/exec_up.sh -n dnode5 -s start
S
slguan 已提交
268 269 270 271 272 273 274 275 276 277
sleep 9000

$x = 0
show5: 
	$x = $x + 1
	sleep 2000
	if $x == 30 then
	  return -1
	endi
sql show dnodes -x show5
S
scripts  
slguan 已提交
278
$dnode1Vnodes = $data2_1
S
slguan 已提交
279
print dnode1 $dnode1Vnodes
S
scripts  
slguan 已提交
280 281 282 283
$dnode4Vnodes = $data2_4
print dnode4 $dnode4Vnodes
$dnode5Vnodes = $data2_5
print dnode5 $dnode5Vnodes
S
slguan 已提交
284 285 286 287

if $dnode1Vnodes != 2 then
  goto show5
endi
S
scripts  
slguan 已提交
288
if $dnode4Vnodes != 2 then
S
slguan 已提交
289 290
  goto show5
endi
S
scripts  
slguan 已提交
291
if $dnode5Vnodes != 2 then
S
slguan 已提交
292 293 294 295
  goto show5
endi

sql show mnodes
S
scripts  
slguan 已提交
296 297
$dnode1Role = $data2_1
$dnode4Role = $data2_4
S
scripts  
slguan 已提交
298
$dnode5Role = $data2_5
S
slguan 已提交
299 300
print dnode1 ==> $dnode1Role
print dnode4 ==> $dnode4Role
S
scripts  
slguan 已提交
301
print dnode5 ==> $dnode5Role
S
slguan 已提交
302 303

print ============================== step6
S
scripts  
slguan 已提交
304
system sh/exec_up.sh -n dnode1 -s stop  -x SIGINT
S
slguan 已提交
305 306 307
print stop dnode1 and sleep 10000
sleep 10000

S
slguan 已提交
308
sql drop dnode $hostname1
S
slguan 已提交
309 310 311
print drop dnode1 and sleep 9000
sleep 9000

S
scripts  
slguan 已提交
312 313 314 315 316 317 318 319 320 321 322 323 324 325 326
sql show mnodes
$dnode1Role = $data2_1
$dnode4Role = $data2_4
$dnode5Role = $data2_5
print dnode1 ==> $dnode1Role
print dnode4 ==> $dnode4Role
print dnode5 ==> $dnode5Role

if $dnode1Role != offline then
  return -1
endi

print ============================== step6.1
system sh/exec_up.sh -n dnode1 -s start

S
slguan 已提交
327 328 329 330 331 332 333 334
$x = 0
show6: 
	$x = $x + 1
	sleep 2000
	if $x == 30 then
	  return -1
	endi
sql show dnodes -x show6
S
scripts  
slguan 已提交
335
$dnode1Vnodes = $data2_1
S
slguan 已提交
336
print dnode1 $dnode1Vnodes
S
scripts  
slguan 已提交
337 338 339 340
$dnode4Vnodes = $data2_4
print dnode4 $dnode4Vnodes
$dnode5Vnodes = $data2_5
print dnode5 $dnode5Vnodes
S
slguan 已提交
341 342 343 344

if $dnode1Vnodes != null then
  goto show6
endi
S
scripts  
slguan 已提交
345
if $dnode4Vnodes != 3 then
S
slguan 已提交
346 347
  goto show6
endi
S
scripts  
slguan 已提交
348
if $dnode5Vnodes != 3 then
S
slguan 已提交
349 350 351 352
  goto show6
endi

sql show mnodes
S
scripts  
slguan 已提交
353 354
$dnode1Role = $data2_1
$dnode4Role = $data2_4
S
scripts  
slguan 已提交
355
$dnode5Role = $data2_5
S
slguan 已提交
356 357
print dnode1 ==> $dnode1Role
print dnode4 ==> $dnode4Role
S
scripts  
slguan 已提交
358 359 360
print dnode5 ==> $dnode5Role

system sh/exec_up.sh -n dnode1 -s stop  -x SIGINT
S
slguan 已提交
361 362

print ============================== step7
S
scripts  
slguan 已提交
363 364 365 366
print ========= start dnode6
sql create dnode $hostname6
system sh/exec_up.sh -n dnode6 -s start
sleep 9000
S
slguan 已提交
367 368

sql show mnodes
S
scripts  
slguan 已提交
369 370
$dnode1Role = $data2_1
$dnode4Role = $data2_4
S
scripts  
slguan 已提交
371 372
$dnode5Role = $data2_5
$dnode6Role = $data2_6
S
slguan 已提交
373 374
print dnode1 ==> $dnode1Role
print dnode4 ==> $dnode4Role
S
scripts  
slguan 已提交
375 376
print dnode5 ==> $dnode5Role
print dnode6 ==> $dnode6Role
S
slguan 已提交
377 378 379 380

$x = 0
show7: 
	sql show mnodes
S
scripts  
slguan 已提交
381
	$dnode4Role = $data2_4
S
scripts  
slguan 已提交
382 383
	$dnode5Role = $data2_5
	$dnode6Role = $data2_6
S
slguan 已提交
384
	print dnode4 ==> $dnode4Role
S
scripts  
slguan 已提交
385 386
	print dnode5 ==> $dnode5Role
	print dnode6 ==> $dnode6Role
S
slguan 已提交
387 388 389 390 391 392 393 394

	$x = $x + 1
	sleep 2000
	if $x == 30 then
	  return -1
	endi
sql show dnodes -x show7

S
scripts  
slguan 已提交
395 396 397 398 399 400 401 402
$dnode4Vnodes = $data2_4
print dnode4 $dnode4Vnodes
$dnode5Vnodes = $data2_5
print dnode5 $dnode5Vnodes
$dnode6Vnodes = $data2_6
print dnode6 $dnode6Vnodes

if $dnode4Vnodes != 2 then
S
slguan 已提交
403 404
  goto show7
endi
S
scripts  
slguan 已提交
405
if $dnode5Vnodes != 2 then
S
slguan 已提交
406 407
  goto show7
endi
S
scripts  
slguan 已提交
408
if $dnode6Vnodes != 2 then
S
slguan 已提交
409 410 411 412 413 414 415 416 417 418 419 420 421 422 423
  goto show7
endi

print ============================== step8
print ========= add db4

sql create database c_b2_d4 replica 2 tables 4
sql use c_b2_d4
sql create table c_b2_t4 (t timestamp, i int) 
sql insert into c_b2_t4 values(1520000020045, 45)
sql insert into c_b2_t4 values(1520000021044, 44)
sql insert into c_b2_t4 values(1520000022043, 43)
sql insert into c_b2_t4 values(1520000023042, 42)
sql insert into c_b2_t4 values(1520000024041, 41)

S
scripts  
slguan 已提交
424 425
sql create dnode $hostname7
system sh/exec_up.sh -n dnode7 -s start
S
slguan 已提交
426 427 428
sleep 9000

sql show mnodes
S
scripts  
slguan 已提交
429
$dnode4Role = $data2_4
S
scripts  
slguan 已提交
430 431 432
$dnode5Role = $data2_5
$dnode6Role = $data2_6
$dnode7Role = $data2_7
S
slguan 已提交
433
print dnode4 ==> $dnode4Role
S
scripts  
slguan 已提交
434 435 436
print dnode5 ==> $dnode5Role
print dnode6 ==> $dnode6Role
print dnode7 ==> $dnode7Role
S
slguan 已提交
437 438 439 440 441 442 443 444 445

$x = 0
show8: 
	$x = $x + 1
	sleep 2000
	if $x == 30 then
	  return -1
	endi
sql show dnodes -x show8
S
scripts  
slguan 已提交
446
$dnode4Vnodes = $data2_4
S
slguan 已提交
447
print dnode4 $dnode4Vnodes
S
scripts  
slguan 已提交
448 449 450 451 452 453
$dnode5Vnodes = $data2_5
print dnode5 $dnode5Vnodes
$dnode6Vnodes = $data2_6
print dnode6 $dnode6Vnodes
$dnode7Vnodes = $data2_7
print dnode7 $dnode7Vnodes
S
slguan 已提交
454

S
scripts  
slguan 已提交
455
if $dnode4Vnodes != 2 then
S
slguan 已提交
456 457
  goto show8
endi
S
scripts  
slguan 已提交
458
if $dnode5Vnodes != 2 then
S
slguan 已提交
459 460
  goto show8
endi
S
scripts  
slguan 已提交
461
if $dnode6Vnodes != 2 then
S
slguan 已提交
462 463
  goto show8
endi
S
scripts  
slguan 已提交
464
if $dnode7Vnodes != 2 then
S
slguan 已提交
465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495
  goto show8
endi

print ============================== step11

sql create database c_b2_d5 replica 2 tables 4
sql use c_b2_d5;
sql create table c_b2_t5 (t timestamp, i int)
sql insert into c_b2_t5 values(1520000020055, 55)
sql insert into c_b2_t5 values(1520000021054, 54)
sql insert into c_b2_t5 values(1520000022053, 53)
sql insert into c_b2_t5 values(1520000023052, 52)
sql insert into c_b2_t5 values(1520000024051, 51)

sql create database c_b2_d6 replica 2 tables 4
sql use c_b2_d6
sql create table c_b2_t6 (t timestamp, i int) 
sql insert into c_b2_t6 values(1520000020065, 65)
sql insert into c_b2_t6 values(1520000021064, 64)
sql insert into c_b2_t6 values(1520000022063, 63)
sql insert into c_b2_t6 values(1520000023062, 62)
sql insert into c_b2_t6 values(1520000024061, 61)

$x = 0
show11: 
	$x = $x + 1
	sleep 2000
	if $x == 30 then
	  return -1
	endi
sql show dnodes -x show11
S
scripts  
slguan 已提交
496
$dnode4Vnodes = $data2_4
S
slguan 已提交
497
print dnode4 $dnode4Vnodes
S
scripts  
slguan 已提交
498 499 500 501 502 503
$dnode5Vnodes = $data2_5
print dnode5 $dnode5Vnodes
$dnode6Vnodes = $data2_6
print dnode6 $dnode6Vnodes
$dnode7Vnodes = $data2_7
print dnode7 $dnode7Vnodes
S
slguan 已提交
504

S
scripts  
slguan 已提交
505
if $dnode4Vnodes != 1 then
S
slguan 已提交
506 507
  goto show11
endi
S
scripts  
slguan 已提交
508
if $dnode5Vnodes != 1 then
S
slguan 已提交
509 510
  goto show11
endi
S
scripts  
slguan 已提交
511
if $dnode6Vnodes != 1 then
S
slguan 已提交
512 513
  goto show11
endi
S
scripts  
slguan 已提交
514
if $dnode7Vnodes != 1 then
S
slguan 已提交
515 516 517 518 519 520
  goto show11
endi

print ============================== step12
print ========= check data

S
scripts  
slguan 已提交
521 522 523
sql reset query cache

sql select * from c_b2_d1.c_b2_t1 order by t desc
S
slguan 已提交
524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540
print $data01 $data11 $data21 $data31 $data41
if $data01 != 11 then
  return -1
endi
if $data11 != 12 then
  return -1
endi
if $data21 != 13 then
  return -1
endi
if $data31 != 14 then
  return -1
endi
if $data41 != 15 then
  return -1
endi

S
scripts  
slguan 已提交
541
sql select * from c_b2_d2.c_b2_t2 order by t desc
S
slguan 已提交
542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559
print $data01 $data11 $data21 $data31 $data41

#if $data01 != 21 then
#  return -1
#endi
#if $data11 != 22 then
#  return -1
#endi
#if $data21 != 23 then
#  return -1
#endi
#if $data31 != 24 then
#  return -1
#endi
#if $data41 != 25 then
#  return -1
#endi

S
scripts  
slguan 已提交
560
sql select * from c_b2_d3.c_b2_t3 order by t desc
S
slguan 已提交
561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577
print $data01 $data11 $data21 $data31 $data41
if $data01 != 31 then
  return -1
endi
if $data11 != 32 then
  return -1
endi
if $data21 != 33 then
  return -1
endi
if $data31 != 34 then
  return -1
endi
if $data41 != 35 then
  return -1
endi

S
scripts  
slguan 已提交
578
sql select * from c_b2_d4.c_b2_t4 order by t desc
S
slguan 已提交
579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595
print $data01 $data11 $data21 $data31 $data41
if $data01 != 41 then
  return -1
endi
if $data11 != 42 then
  return -1
endi
if $data21 != 43 then
  return -1
endi
if $data31 != 44 then
  return -1
endi
if $data41 != 45 then
  return -1
endi

S
scripts  
slguan 已提交
596
sql select * from c_b2_d5.c_b2_t5 order by t desc
S
slguan 已提交
597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613
print $data01 $data11 $data21 $data31 $data41
if $data01 != 51 then
  return -1
endi
if $data11 != 52 then
  return -1
endi
if $data21 != 53 then
  return -1
endi
if $data31 != 54 then
  return -1
endi
if $data41 != 55 then
  return -1
endi

S
scripts  
slguan 已提交
614
sql select * from c_b2_d6.c_b2_t6 order by t desc
S
slguan 已提交
615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632
print $data01 $data11 $data21 $data31 $data41
if $data01 != 61 then
  return -1
endi
if $data11 != 62 then
  return -1
endi
if $data21 != 63 then
  return -1
endi
if $data31 != 64 then
  return -1
endi
if $data41 != 65 then
  return -1
endi

print ============================================ over
S
scripts  
slguan 已提交
633 634 635 636 637 638 639 640
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