未验证 提交 342fa888 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #2691 from taosdata/feature/vnode

Feature/vnode
......@@ -318,7 +318,7 @@ SDataCols *tdNewDataCols(int maxRowSize, int maxCols, int maxRows) {
pCols->maxPoints = maxRows;
pCols->bufSize = maxRowSize * maxRows;
pCols->buf = malloc(pCols->bufSize);
pCols->buf = calloc(1, pCols->bufSize);
if (pCols->buf == NULL) {
free(pCols);
return NULL;
......
......@@ -136,6 +136,8 @@ echo "defaultPass taosdata" >> $TAOS_CFG
echo "numOfLogLines 20000000" >> $TAOS_CFG
echo "mnodeEqualVnodeNum 0" >> $TAOS_CFG
echo "clog 2" >> $TAOS_CFG
#echo "cache 1" >> $TAOS_CFG
#echo "block 2" >> $TAOS_CFG
echo "statusInterval 1" >> $TAOS_CFG
echo "numOfTotalVnodes 4" >> $TAOS_CFG
echo "maxVgroupsPerDb 4" >> $TAOS_CFG
......
......@@ -88,7 +88,9 @@ if [ "$EXEC_OPTON" = "start" ]; then
echo "ExcuteCmd:" $EXE_DIR/taosd -c $CFG_DIR
if [ "$SHELL_OPTION" = "true" ]; then
nohup valgrind --log-file=${LOG_DIR}/valgrind.log --tool=memcheck --leak-check=full --show-reachable=no --track-origins=yes --show-leak-kinds=all -v --workaround-gcc296-bugs=yes $EXE_DIR/taosd -c $CFG_DIR > /dev/null 2>&1 &
TT=`date +%s`
mkdir ${LOG_DIR}/${TT}
nohup valgrind --log-file=${LOG_DIR}/${TT}/valgrind.log --tool=memcheck --leak-check=full --show-reachable=no --track-origins=yes --show-leak-kinds=all -v --workaround-gcc296-bugs=yes $EXE_DIR/taosd -c $CFG_DIR > /dev/null 2>&1 &
else
nohup $EXE_DIR/taosd -c $CFG_DIR > /dev/null 2>&1 &
fi
......
system sh/stop_dnodes.sh
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/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
system sh/cfg.sh -n dnode1 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode2 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode3 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode4 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode1 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode2 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode3 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode4 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode1 -c debugFlag -v 131
system sh/cfg.sh -n dnode2 -c debugFlag -v 131
system sh/cfg.sh -n dnode3 -c debugFlag -v 131
system sh/cfg.sh -n dnode4 -c debugFlag -v 131
system sh/cfg.sh -n dnode1 -c arbitrator -v $arbitrator
system sh/cfg.sh -n dnode2 -c arbitrator -v $arbitrator
system sh/cfg.sh -n dnode3 -c arbitrator -v $arbitrator
system sh/cfg.sh -n dnode4 -c arbitrator -v $arbitrator
print ============== step0: start tarbitrator
system sh/exec_tarbitrator.sh -s start
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
sql create dnode $hostname2
sql create dnode $hostname3
system sh/exec.sh -n dnode2 -s start -t
system sh/exec.sh -n dnode3 -s start -t
sleep 3000
print ========= step1
sql create database db replica 2
#sql create table db.tb1 (ts timestamp, i int)
#sql create table db.tb2 (ts timestamp, i int)
#sql create table db.tb3 (ts timestamp, i int)
#sql create table db.tb4 (ts timestamp, i int)
#sql insert into db.tb1 values(now, 1)
#sql select count(*) from db.tb1
sql create database db replica 2
sql create table db.tb (ts timestamp, i int)
sql insert into db.tb values(now, 1)
sql select count(*) from db.tb
$lastRows = $rows
print ======== step2
#run_back unique/vnode/back_insert_many.sim
run_back unique/vnode/back_insert.sim
sleep 3000
print ======== step3
$x = 0
loop:
print ======== step4
system sh/exec.sh -n dnode2 -s stop -x SIGINT
sleep 10000
system sh/exec.sh -n dnode2 -s start -t
sleep 10000
print ======== step5
system sh/exec.sh -n dnode3 -s stop -x SIGINT
sleep 10000
system sh/exec.sh -n dnode3 -s start -t
sleep 10000
print ======== step6
#sql select count(*) from db.tb1
#print select count(*) from db.tb1 ==> $data00 $lastRows
sql select count(*) from db.tb
print select count(*) from db.tb ==> $data00 $lastRows
if $data00 <= $lastRows then
return -1
endi
print ======== step7
$lastRows = $data00
print ======== loop Times $x
if $x < 10 then
$x = $x + 1
goto loop
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT
system sh/exec.sh -n dnode4 -s stop -x SIGINT
system sh/exec.sh -n dnode5 -s stop -x SIGINT
system sh/exec.sh -n dnode6 -s stop -x SIGINT
system sh/exec.sh -n dnode7 -s stop -x SIGINT
system sh/exec.sh -n dnode8 -s stop -x SIGINT
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册