enh: save sdb file if there is too many commit
This commit is contained in:
parent
147c7ee0b4
commit
c4c1ce9b9e
|
@ -48,6 +48,10 @@ void mndSyncCommitMsg(struct SSyncFSM *pFsm, const SRpcMsg *pMsg, SFsmCbMeta cbM
|
||||||
mError("trans:%d, failed to propose since %s", transId, tstrerror(pMgmt->errCode));
|
mError("trans:%d, failed to propose since %s", transId, tstrerror(pMgmt->errCode));
|
||||||
}
|
}
|
||||||
tsem_post(&pMgmt->syncSem);
|
tsem_post(&pMgmt->syncSem);
|
||||||
|
} else {
|
||||||
|
if (cbMeta.index - sdbGetApplyIndex(pMnode->pSdb) > 100) {
|
||||||
|
sdbWriteFile(pMnode->pSdb);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue