diff --git a/src/plugins/monitor/src/monitorMain.c b/src/plugins/monitor/src/monitorMain.c index 76b322d01b9396cdc48f0af2d8e3ec3e5961b82b..ae8038e44498621b1dc764d1ffb0576b6d75da24 100644 --- a/src/plugins/monitor/src/monitorMain.c +++ b/src/plugins/monitor/src/monitorMain.c @@ -109,6 +109,11 @@ static void monitorStartSystemRetry() { } static void monitorInitConn(void *para, void *unused) { + if (dnodeGetDnodeId() <= 0) { + monitorStartSystemRetry(); + return; + } + monitorPrint("starting to initialize monitor service .."); tsMonitorConn.state = MONITOR_STATE_INITIALIZING; diff --git a/tests/script/jenkins/basic.txt b/tests/script/jenkins/basic.txt index f253de09c41f664a6a40866e815c0c262fc0ba01..272183b26d4c432d80002e454c7809601af75820 100644 --- a/tests/script/jenkins/basic.txt +++ b/tests/script/jenkins/basic.txt @@ -241,14 +241,14 @@ cd ../../../debug; make ./test.sh -u -f unique/account/user_create.sim ./test.sh -u -f unique/account/user_len.sim -#./test.sh -u -f unique/big/balance.sim -#slguan ./test.sh -u -f unique/big/maxvnodes.sim +#liao wait ./test.sh -u -f unique/big/balance.sim +#liao wait ./test.sh -u -f unique/big/maxvnodes.sim ./test.sh -u -f unique/big/tcp.sim -#jeff ./test.sh -u -f unique/cluster/balance1.sim -#jeff ./test.sh -u -f unique/cluster/balance2.sim -#jeff ./test.sh -u -f unique/cluster/balance3.sim -#./test.sh -u -f unique/cluster/cache.sim +./test.sh -u -f unique/cluster/balance1.sim +./test.sh -u -f unique/cluster/balance2.sim +./test.sh -u -f unique/cluster/balance3.sim +./test.sh -u -f unique/cluster/cache.sim ./test.sh -u -f unique/column/replica3.sim diff --git a/tests/script/unique/cluster/balance1.sim b/tests/script/unique/cluster/balance1.sim index 10e05971d7f0f01a1641f615cef2097417793e9a..424a80d25aa397837fd4598ccd0a48c77e27f140 100644 --- a/tests/script/unique/cluster/balance1.sim +++ b/tests/script/unique/cluster/balance1.sim @@ -77,7 +77,7 @@ print dnode2 $dnode2Vnodes if $dnode1Vnodes != 2 then return -1 endi -if $dnode2Vnodes != NULL then +if $dnode2Vnodes != null then return -1 endi @@ -146,7 +146,7 @@ print dnode2 $dnode2Vnodes if $dnode1Vnodes != 3 then goto show4 endi -if $dnode2Vnodes != NULL then +if $dnode2Vnodes != null then goto show4 endi @@ -229,7 +229,7 @@ print dnode3 $dnode3Vnodes if $dnode1Vnodes != 3 then goto show8 endi -if $dnode3Vnodes != NULL then +if $dnode3Vnodes != null then goto show8 endi @@ -245,7 +245,7 @@ if $dnode1Role != master then return -1 endi -if $dnode3Role != NULL then +if $dnode3Role != null then return -1 endi diff --git a/tests/script/unique/cluster/balance2.sim b/tests/script/unique/cluster/balance2.sim index d741e03eec9723a7e191c35138836b784a8658bc..08fdd233e012f89a29bcaca938fb34f73aeb224a 100644 --- a/tests/script/unique/cluster/balance2.sim +++ b/tests/script/unique/cluster/balance2.sim @@ -131,7 +131,7 @@ print dnode3 $dnode3Vnodes if $dnode1Vnodes != 3 then goto show2 endi -if $dnode2Vnodes != NULL then +if $dnode2Vnodes != null then goto show2 endi if $dnode3Vnodes != 3 then @@ -194,7 +194,7 @@ print dnode4 ==> $dnode4Role if $dnode1Role != master then return -1 endi -if $dnode2Role != NULL then +if $dnode2Role != null then return -1 endi if $dnode3Role != slave then @@ -231,7 +231,7 @@ endi if $dnode4Vnodes != 3 then goto show4 endi -if $dnode3Vnodes != NULL then +if $dnode3Vnodes != null then goto show4 endi @@ -248,10 +248,10 @@ print dnode4 ==> $dnode4Role if $dnode1Role != master then return -1 endi -if $dnode2Role != NULL then +if $dnode2Role != null then return -1 endi -if $dnode3Role != NULL then +if $dnode3Role != null then return -1 endi @@ -339,7 +339,7 @@ print dnode4 $dnode4Vnodes $dnode5Vnodes = $data2_5 print dnode5 $dnode5Vnodes -if $dnode1Vnodes != NULL then +if $dnode1Vnodes != null then goto show6 endi if $dnode4Vnodes != 3 then diff --git a/tests/script/unique/cluster/balance3.sim b/tests/script/unique/cluster/balance3.sim index e9847e21dac7af4deeb8e92b8ff59b2b5bc8a821..407adc7f3b61301d6a5d08047160ae0b4d3fac27 100644 --- a/tests/script/unique/cluster/balance3.sim +++ b/tests/script/unique/cluster/balance3.sim @@ -110,7 +110,7 @@ endi if $dnode3Vnodes != 3 then goto show1 endi -if $dnode4Vnodes != NULL then +if $dnode4Vnodes != null then goto show1 endi @@ -166,7 +166,7 @@ print dnode4 $dnode4Vnodes if $dnode1Vnodes != 3 then goto show3 endi -if $dnode2Vnodes != NULL then +if $dnode2Vnodes != null then goto show3 endi if $dnode3Vnodes != 3 then @@ -232,7 +232,7 @@ endi if $dnode5Vnodes != 3 then goto show5 endi -if $dnode3Vnodes != NULL then +if $dnode3Vnodes != null then goto show5 endi if $dnode4Vnodes != 3 then @@ -298,7 +298,7 @@ endi if $dnode6Vnodes != 3 then goto show7 endi -if $dnode4Vnodes != NULL then +if $dnode4Vnodes != null then goto show7 endi diff --git a/tests/script/unique/cluster/cache.sim b/tests/script/unique/cluster/cache.sim index 41f9db69f37c6d2578c27cdbdde8015b5503b385..e23b40782870be00eb3f010cbcdba693e18b19da 100644 --- a/tests/script/unique/cluster/cache.sim +++ b/tests/script/unique/cluster/cache.sim @@ -4,26 +4,18 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode2 -i 2 -system sh/cfg.sh -n dnode1 -c walLevel -v 0 -system sh/cfg.sh -n dnode2 -c walLevel -v 0 +system sh/cfg.sh -n dnode1 -c walLevel -v 0 +system sh/cfg.sh -n dnode2 -c walLevel -v 0 system sh/cfg.sh -n dnode1 -c httpMaxThreads -v 2 system sh/cfg.sh -n dnode2 -c httpMaxThreads -v 2 system sh/cfg.sh -n dnode1 -c monitor -v 1 -system sh/cfg.sh -n dnode2 -c http -v 1 +system sh/cfg.sh -n dnode1 -c monitor -v 2 +system sh/cfg.sh -n dnode2 -c http -v 1 system sh/cfg.sh -n dnode1 -c enableHttp -v 1 system sh/cfg.sh -n dnode2 -c monitor -v 1 system sh/cfg.sh -n dnode1 -c monitorInterval -v 1 system sh/cfg.sh -n dnode2 -c monitorInterval -v 1 -system sh/cfg.sh -n dnode1 -c maxVnodeConnections -v 30000 -system sh/cfg.sh -n dnode2 -c maxVnodeConnections -v 30000 -system sh/cfg.sh -n dnode1 -c maxMgmtConnections -v 30000 -system sh/cfg.sh -n dnode2 -c maxMgmtConnections -v 30000 -system sh/cfg.sh -n dnode1 -c maxMeterConnections -v 30000 -system sh/cfg.sh -n dnode2 -c maxMeterConnections -v 30000 -system sh/cfg.sh -n dnode1 -c maxShellConns -v 30000 -system sh/cfg.sh -n dnode2 -c maxShellConns -v 30000 - system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect @@ -45,13 +37,20 @@ sleep 3000 system sh/exec.sh -n dnode2 -s start sql create dnode $hostname2 -sleep 20000 -sql select * from log.dn_192_168_0_1 + +sleep 10000 + +sql show log.tables; +if $rows != 5 then + return -1 +endi + +sql select * from log.dn1 print ===>rows $rows print $data00 $data01 $data02 print $data10 $data11 $data12 print $data20 $data21 $data22 -if $rows < 20 then +if $rows < 10 then return -1 endi