From df18ddbbb52f3b7436f2ff2b0debf862233214f1 Mon Sep 17 00:00:00 2001 From: Benguang Zhao Date: Sat, 8 Oct 2022 15:16:45 +0800 Subject: [PATCH] enh: remove WAL log file corrupted completely --- source/libs/wal/src/walMeta.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/libs/wal/src/walMeta.c b/source/libs/wal/src/walMeta.c index 797393c47e..be74b6bfc9 100644 --- a/source/libs/wal/src/walMeta.c +++ b/source/libs/wal/src/walMeta.c @@ -118,6 +118,8 @@ static FORCE_INLINE int64_t walScanLogGetLastVer(SWal* pWal) { if (found == NULL) { wError("WAL log file corrupted: no valid WAL record found. file: %s", fnameStr); terrno = TSDB_CODE_WAL_FILE_CORRUPTED; + taosRemoveFile(fnameStr); + wWarn("vgId:%d, remove corrupted WAL log file: %s", pWal->cfg.vgId, fnameStr); goto _err; } -- GitLab