enh: turn error on WAL data size to recover exceeding a limit as warn

This commit is contained in:
benguang.zhao 2022-11-01 17:26:31 +08:00
parent 4237cafb21
commit 3c1c95c5e6
1 changed files with 3 additions and 5 deletions

View File

@ -81,11 +81,9 @@ static FORCE_INLINE int64_t walScanLogGetLastVer(SWal* pWal, int32_t fileIdx) {
int64_t recoverSize = end - offset;
if (2 * tsWalFsyncDataSizeLimit < recoverSize) {
wError("vgId:%d, possibly corrupted WAL range exceeds size limit (i.e. %" PRId64 " bytes). offset:%" PRId64
", end:%" PRId64 ", file:%s",
pWal->cfg.vgId, 2 * tsWalFsyncDataSizeLimit, offset, end, fnameStr);
terrno = TSDB_CODE_WAL_SIZE_LIMIT;
goto _err;
wWarn("vgId:%d, possibly corrupted WAL range exceeds size limit (i.e. %" PRId64 " bytes). offset:%" PRId64
", end:%" PRId64 ", file:%s",
pWal->cfg.vgId, 2 * tsWalFsyncDataSizeLimit, offset, end, fnameStr);
}
// search for the valid last WAL entry, e.g. block by block