fix(tsdb): checksum checking shall skip page 1 when loading

This commit is contained in:
Minglei Jin 2022-10-14 18:58:07 +08:00
parent 3a20447b9d
commit b8dfe8707f
1 changed files with 2 additions and 2 deletions

View File

@ -124,7 +124,7 @@ static int32_t tsdbReadFilePage(STsdbFD *pFD, int64_t pgno) {
}
// check
if (!taosCheckChecksumWhole(pFD->pBuf, pFD->szPage)) {
if (pgno > 1 && !taosCheckChecksumWhole(pFD->pBuf, pFD->szPage)) {
code = TSDB_CODE_FILE_CORRUPTED;
goto _exit;
}
@ -1588,4 +1588,4 @@ int32_t tsdbReadDelIdx(SDelFReader *pReader, SArray *aDelIdx) {
_err:
tsdbError("vgId:%d, read del idx failed since %s", TD_VID(pReader->pTsdb->pVnode), tstrerror(code));
return code;
}
}