提交 60dc2615 编写于 作者: B Benguang Zhao

enh: tolerate WAL_MAGIC mismatch as long as checksums being valid

上级 b434ac2f
......@@ -139,12 +139,6 @@ static FORCE_INLINE int64_t walScanLogGetLastVer(SWal* pWal, int32_t fileIdx) {
}
logContent = (SWalCkHead*)(buf + pos);
if (logContent->magic != WAL_MAGIC) {
terrno = TSDB_CODE_WAL_FILE_CORRUPTED;
ASSERT(forwardStage);
wError("vgId:%d, wal magic is corrupted. offset:%" PRId64 ", file:%s ", pWal->cfg.vgId, offset + pos, fnameStr);
break;
}
if (walValidHeadCksum(logContent) != 0) {
terrno = TSDB_CODE_WAL_CHKSUM_MISMATCH;
wWarn("vgId:%d, failed to validate checksum of wal entry header. offset:%" PRId64 ", file:%s", pWal->cfg.vgId,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册