refactor(query): disable file size check when reading data files.
This commit is contained in:
parent
40b7718078
commit
7168f90c51
|
@ -47,7 +47,9 @@ static int32_t tsdbOpenFile(const char *path, int32_t szPage, int32_t flag, STsd
|
|||
taosMemoryFree(pFD);
|
||||
goto _exit;
|
||||
}
|
||||
if (flag == TD_FILE_READ) {
|
||||
|
||||
// not check file size when reading data files.
|
||||
if (flag != TD_FILE_READ) {
|
||||
if (taosStatFile(path, &pFD->szFile, NULL) < 0) {
|
||||
code = TAOS_SYSTEM_ERROR(errno);
|
||||
taosMemoryFree(pFD->pBuf);
|
||||
|
@ -55,9 +57,11 @@ static int32_t tsdbOpenFile(const char *path, int32_t szPage, int32_t flag, STsd
|
|||
taosMemoryFree(pFD);
|
||||
goto _exit;
|
||||
}
|
||||
|
||||
ASSERT(pFD->szFile % szPage == 0);
|
||||
pFD->szFile = pFD->szFile / szPage;
|
||||
}
|
||||
|
||||
*ppFD = pFD;
|
||||
|
||||
_exit:
|
||||
|
|
Loading…
Reference in New Issue