diff --git a/source/libs/wal/src/walMeta.c b/source/libs/wal/src/walMeta.c index 6cac4b6093b8141d1a0d244f7607fab4b8e8618d..d77acbbb6f8930250543f7433422aec8527cda79 100644 --- a/source/libs/wal/src/walMeta.c +++ b/source/libs/wal/src/walMeta.c @@ -285,6 +285,9 @@ void walAlignVersions(SWal* pWal) { if (pWal->vers.lastVer < pWal->vers.snapshotVer) { wWarn("vgId:%d, lastVer:%" PRId64 " is less than snapshotVer:%" PRId64 ". align with it.", pWal->cfg.vgId, pWal->vers.lastVer, pWal->vers.snapshotVer); + if (pWal->vers.lastVer < pWal->vers.firstVer) { + pWal->vers.firstVer = pWal->vers.snapshotVer + 1; + } pWal->vers.lastVer = pWal->vers.snapshotVer; } if (pWal->vers.commitVer < pWal->vers.snapshotVer) {