minor changes

This commit is contained in:
Shengliang Guan 2022-01-07 00:01:51 -08:00
parent 5f72c178fd
commit 34fd49c7f7
1 changed files with 7 additions and 7 deletions

View File

@ -86,19 +86,19 @@ static int32_t mndRestoreWal(SMnode *pMnode) {
mndTransPullup(pMnode);
if (walBeginSnapshot(pWal, sdbVer) < 0) {
goto WAL_RESTORE_OVER;
}
if (sdbVer != lastSdbVer) {
mInfo("sdb restored from %" PRId64 " to %" PRId64 ", write file", lastSdbVer, sdbVer);
if (sdbWriteFile(pSdb) != 0) {
goto WAL_RESTORE_OVER;
}
}
if (walEndSnapshot(pWal) < 0) {
goto WAL_RESTORE_OVER;
if (walBeginSnapshot(pWal, sdbVer) < 0) {
goto WAL_RESTORE_OVER;
}
if (walEndSnapshot(pWal) < 0) {
goto WAL_RESTORE_OVER;
}
}
code = 0;