From b600b4c8bc088582acd2e7d6fe1fdf877c11fa24 Mon Sep 17 00:00:00 2001 From: Minghao Li Date: Mon, 21 Nov 2022 16:18:50 +0800 Subject: [PATCH] refactor(sync): modify wal pInfo++, to find which case can not pass --- source/libs/wal/src/walWrite.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/libs/wal/src/walWrite.c b/source/libs/wal/src/walWrite.c index 6cd127fed4..caae669e4a 100644 --- a/source/libs/wal/src/walWrite.c +++ b/source/libs/wal/src/walWrite.c @@ -325,7 +325,8 @@ int32_t walEndSnapshot(SWal *pWal) { SWalFileInfo *pInfo = taosArraySearch(pWal->fileInfoSet, &tmp, compareWalFileInfo, TD_LE); if (pInfo) { if (ver >= pInfo->lastVer) { - pInfo--; + //pInfo--; + pInfo++; } if (POINTER_DISTANCE(pInfo, pWal->fileInfoSet->pData) > 0) { wDebug("vgId:%d, wal end remove for %" PRId64, pWal->cfg.vgId, pInfo->firstVer); -- GitLab