This commit is contained in:
Hongze Cheng 2022-09-04 22:32:09 +08:00
parent c71455216c
commit 0480158500
1 changed files with 1 additions and 1 deletions

View File

@ -148,7 +148,7 @@ int32_t tsdbDFileRollback(STsdb *pTsdb, SDFileSet *pSet, EDataFileT ftype) {
}
// ftruncate
if (taosFtruncateFile(pFD, size) < 0) {
if (taosFtruncateFile(pFD, LOGIC_TO_FILE_SIZE(size, TSDB_DEFAULT_PAGE_SIZE)) < 0) {
code = TAOS_SYSTEM_ERROR(errno);
goto _err;
}