diff --git a/source/libs/tdb/src/db/tdbUtil.c b/source/libs/tdb/src/db/tdbUtil.c index 4abc890f94..fc299b3fc1 100644 --- a/source/libs/tdb/src/db/tdbUtil.c +++ b/source/libs/tdb/src/db/tdbUtil.c @@ -30,20 +30,5 @@ int tdbGnrtFileID(const char *fname, uint8_t *fileid, bool unique) { ((uint64_t *)fileid)[2] = taosRand(); } - return 0; -} - -int tdbGetFileSize(const char *fname, int pgSize, SPgno *pSize) { - struct stat st; - int ret; - int64_t file_size = 0; - ret = taosStatFile(fname, &file_size, NULL); - if (ret != 0) { - return -1; - } - - ASSERT(file_size % pgSize == 0); - - *pSize = file_size / pgSize; return 0; } \ No newline at end of file diff --git a/source/libs/tdb/src/inc/tdbUtil.h b/source/libs/tdb/src/inc/tdbUtil.h index 6e6faf9b74..c06d9d18c9 100644 --- a/source/libs/tdb/src/inc/tdbUtil.h +++ b/source/libs/tdb/src/inc/tdbUtil.h @@ -30,8 +30,6 @@ extern "C" { int tdbGnrtFileID(const char *fname, uint8_t *fileid, bool unique); -int tdbGetFileSize(const char *fname, int pgSize, SPgno *pSize); - #define TDB_REALLOC(PTR, SIZE) \ ({ \ void *nPtr; \