enh: replace asserts with error logs in walReadVer

This commit is contained in:
Benguang Zhao 2022-10-09 11:58:28 +08:00
parent 948fa60ef0
commit c693384ec4
1 changed files with 2 additions and 1 deletions

View File

@ -476,7 +476,7 @@ int32_t walReadVer(SWalReader *pReader, int64_t ver) {
} else {
terrno = TSDB_CODE_WAL_FILE_CORRUPTED;
}
ASSERT(0);
wError("vgId:%d, failed to read WAL record head from log file since %s", pReader->pWal->cfg.vgId, terrstr());
taosThreadMutexUnlock(&pReader->mutex);
return -1;
}
@ -509,6 +509,7 @@ int32_t walReadVer(SWalReader *pReader, int64_t ver) {
else {
terrno = TSDB_CODE_WAL_FILE_CORRUPTED;
}
wError("vgId:%d, failed to read WAL record body from log file since %s", pReader->pWal->cfg.vgId, terrstr());
taosThreadMutexUnlock(&pReader->mutex);
return -1;
}