From 20e31aacca9c3e5ca2d93c90853fa3524191efc4 Mon Sep 17 00:00:00 2001 From: Liu Jicong Date: Tue, 15 Nov 2022 19:48:16 +0800 Subject: [PATCH] fix(wal): set commit ver and snapshot ver after restore --- source/libs/wal/src/walWrite.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/libs/wal/src/walWrite.c b/source/libs/wal/src/walWrite.c index 216dd5fcb1..1a75d5ed81 100644 --- a/source/libs/wal/src/walWrite.c +++ b/source/libs/wal/src/walWrite.c @@ -70,8 +70,8 @@ int32_t walRestoreFromSnapshot(SWal *pWal, int64_t ver) { taosArrayClear(pWal->fileInfoSet); pWal->vers.firstVer = -1; pWal->vers.lastVer = ver; - pWal->vers.commitVer = ver - 1; - pWal->vers.snapshotVer = ver - 1; + pWal->vers.commitVer = ver; + pWal->vers.snapshotVer = ver; pWal->vers.verInSnapshotting = -1; taosThreadMutexUnlock(&pWal->mutex);