提交 6cf9f50c 编写于 作者: M Minghao Li

enh(sync): syncStartStandBy

上级 8f37bb2e
......@@ -81,6 +81,7 @@ typedef struct {
sem_t syncSem;
int64_t sync;
ESyncState state;
bool isStandBy;
} SSyncMgmt;
typedef struct {
......
......@@ -182,7 +182,11 @@ int32_t mndSyncPropose(SMnode *pMnode, SSdbRaw *pRaw) {
void mndSyncStart(SMnode *pMnode) {
SSyncMgmt *pMgmt = &pMnode->syncMgmt;
syncSetMsgCb(pMgmt->sync, &pMnode->msgCb);
syncStart(pMgmt->sync);
if (pMgmt->isStandBy) {
syncStartStandBy(pMgmt->sync);
} else {
syncStart(pMgmt->sync);
}
mDebug("sync:%" PRId64 " is started", pMgmt->sync);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册