fix: [TS-5926] change wal read file log (#30416)

This commit is contained in:
dongming chen 2025-03-24 21:30:09 +08:00 committed by GitHub
parent 55c5f8190d
commit 2502086b71
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 2 deletions

View File

@ -426,11 +426,15 @@ int32_t walReadVer(SWalReader *pReader, int64_t ver) {
} else {
if (contLen < 0) {
code = terrno;
wError("vgId:%d, failed to read WAL record head, index:%" PRId64 ", from log file since %s",
pReader->pWal->cfg.vgId, ver, tstrerror(code));
} else {
code = TSDB_CODE_WAL_FILE_CORRUPTED;
wError("vgId:%d, failed to read WAL record head, index:%" PRId64 ", not enough bytes read, readLen:%" PRId64
", "
"expectedLen:%d",
pReader->pWal->cfg.vgId, ver, contLen, (int32_t)sizeof(SWalCkHead));
}
wError("vgId:%d, failed to read WAL record head, index:%" PRId64 ", from log file since %s",
pReader->pWal->cfg.vgId, ver, tstrerror(code));
TAOS_UNUSED(taosThreadMutexUnlock(&pReader->mutex));
TAOS_RETURN(code);
}