提交 335b56ed 编写于 作者: S Shengliang Guan

fix: set standby while create mnode

上级 b0648880
...@@ -219,17 +219,12 @@ void mndSyncStart(SMnode *pMnode) { ...@@ -219,17 +219,12 @@ void mndSyncStart(SMnode *pMnode) {
SSyncMgmt *pMgmt = &pMnode->syncMgmt; SSyncMgmt *pMgmt = &pMnode->syncMgmt;
syncSetMsgCb(pMgmt->sync, &pMnode->msgCb); syncSetMsgCb(pMgmt->sync, &pMnode->msgCb);
syncStart(pMgmt->sync);
#if 0
if (pMgmt->standby) { if (pMgmt->standby) {
syncStartStandBy(pMgmt->sync); syncStartStandBy(pMgmt->sync);
} else { } else {
syncStart(pMgmt->sync); syncStart(pMgmt->sync);
} }
#endif mDebug("sync:%" PRId64 " is started, standby:%d", pMgmt->sync, pMgmt->standby);
mDebug("sync:%" PRId64 " is started", pMgmt->sync);
} }
void mndSyncStop(SMnode *pMnode) {} void mndSyncStop(SMnode *pMnode) {}
......
...@@ -36,13 +36,14 @@ if $data(2)[4] != ready then ...@@ -36,13 +36,14 @@ if $data(2)[4] != ready then
goto step1 goto step1
endi endi
print =============== create drop mnode 1
sql_error create mnode on dnode 1 sql_error create mnode on dnode 1
sql_error drop mnode on dnode 1 sql_error drop mnode on dnode 1
print =============== create mnode 2
sql create mnode on dnode 2 sql create mnode on dnode 2
$x = 0 $x = 0
step1: step2:
$x = $x + 1 $x = $x + 1
sleep 1000 sleep 1000
if $x == 20 then if $x == 20 then
...@@ -65,11 +66,11 @@ if $data(2)[0] != 2 then ...@@ -65,11 +66,11 @@ if $data(2)[0] != 2 then
return -1 return -1
endi endi
if $data(2)[2] != FOLLOWER then if $data(2)[2] != FOLLOWER then
goto step1 goto step2
endi endi
sleep 2000 sleep 2000
print ============ drop mnodes print ============ drop mnode 2
sql drop mnode on dnode 2 sql drop mnode on dnode 2
sql show mnodes sql show mnodes
if $rows != 1 then if $rows != 1 then
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册