refactor(sync): modify wal pInfo++, to find which case can not pass

This commit is contained in:
Minghao Li 2022-11-21 16:18:50 +08:00
parent 6acf23b972
commit b600b4c8bc
1 changed files with 2 additions and 1 deletions

View File

@ -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);