提交 f5e3b409 编写于 作者: S Shengliang Guan

refactor: add some log

上级 e7048eb6
......@@ -51,6 +51,7 @@ int32_t mndSyncGetSnapshot(struct SSyncFSM *pFsm, SSnapshot *pSnapshot) {
void mndRestoreFinish(struct SSyncFSM *pFsm) {
SMnode *pMnode = pFsm->data;
if (!pMnode->deploy) {
mInfo("mnode sync restore finished");
mndTransPullup(pMnode);
pMnode->syncMgmt.restored = true;
}
......
......@@ -77,9 +77,12 @@ endi
# return -1
#endi
sleep 5000
system sh/exec.sh -n dnode1 -s stop
system sh/exec.sh -n dnode2 -s stop
sleep 100
return
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode2 -s start
......
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/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
sql connect
print =============== step1: create dnodes
sql create dnode $hostname port 7200
sql create dnode $hostname port 7300
$x = 0
step1:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show dnodes
if $data(1)[4] != ready then
goto step1
endi
if $data(2)[4] != ready then
goto step1
endi
if $data(3)[4] != ready then
goto step1
endi
print =============== step2: create mnode 2
sql create mnode on dnode 2
sql create mnode on dnode 3
$x = 0
step2:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show mnodes
print $data(1)[0] $data(1)[1] $data(1)[2]
print $data(2)[0] $data(2)[1] $data(2)[2]
print $data(3)[0] $data(3)[1] $data(3)[2]
if $data(1)[2] != LEADER then
goto step2
endi
if $data(2)[2] != FOLLOWER then
goto step2
endi
if $data(3)[2] != FOLLOWER then
goto step2
endi
print =============== step3: create user
sql create user user1 PASS 'user1'
sql show users
if $rows != 2 then
return -1
endi
sleep 10000
print =============== step4: stop dnode1
system sh/exec.sh -n dnode1 -s stop
return
system sh/exec.sh -n dnode2 -s stop
sleep 100
return
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode2 -s start
sleep 10000
sql connect
sql show mnodes
if $rows != 2 then
return -1
endi
if $data(1)[0] != 1 then
return -1
endi
if $data(1)[2] != LEADER then
return -1
endi
sql show users
if $rows != 2 then
return -1
endi
#sql show databases
#if $rows != 3 then
# return -1
#endi
return
system sh/exec.sh -n dnode1 -s stop
system sh/exec.sh -n dnode2 -s stop
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册