enh(sync): syncStartStandBy
This commit is contained in:
parent
8f37bb2e56
commit
6cf9f50c3a
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue