fix: save sync config in mnode
This commit is contained in:
parent
2dd1c31f0b
commit
95ca88432f
|
@ -163,7 +163,10 @@ void sdbSetApplyIndex(SSdb *pSdb, int64_t index) { pSdb->curVer = index; }
|
||||||
|
|
||||||
void sdbSetApplyTerm(SSdb *pSdb, int64_t term) { pSdb->curTerm = term; }
|
void sdbSetApplyTerm(SSdb *pSdb, int64_t term) { pSdb->curTerm = term; }
|
||||||
|
|
||||||
void sdbSetCurConfig(SSdb *pSdb, int64_t config) { pSdb->curConfig = config; }
|
void sdbSetCurConfig(SSdb *pSdb, int64_t config) {
|
||||||
|
mInfo("mnode sync config set from %" PRId64 " to %" PRId64, pSdb->curConfig, config);
|
||||||
|
pSdb->curConfig = config;
|
||||||
|
}
|
||||||
|
|
||||||
int64_t sdbGetApplyIndex(SSdb *pSdb) { return pSdb->curVer; }
|
int64_t sdbGetApplyIndex(SSdb *pSdb) { return pSdb->curVer; }
|
||||||
|
|
||||||
|
|
|
@ -432,8 +432,8 @@ static int32_t sdbWriteFileImp(SSdb *pSdb) {
|
||||||
} else {
|
} else {
|
||||||
pSdb->lastCommitVer = pSdb->curVer;
|
pSdb->lastCommitVer = pSdb->curVer;
|
||||||
pSdb->lastCommitTerm = pSdb->curTerm;
|
pSdb->lastCommitTerm = pSdb->curTerm;
|
||||||
mDebug("write sdb file successfully, ver:%" PRId64 " term:%" PRId64 " file:%s", pSdb->lastCommitVer,
|
mDebug("write sdb file successfully, index:%" PRId64 " term:%" PRId64 " config:%" PRId64 " file:%s",
|
||||||
pSdb->lastCommitTerm, curfile);
|
pSdb->lastCommitVer, pSdb->lastCommitTerm, pSdb->curConfig, curfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
terrno = code;
|
terrno = code;
|
||||||
|
|
Loading…
Reference in New Issue