diff --git a/source/dnode/vnode/src/inc/tsdb.h b/source/dnode/vnode/src/inc/tsdb.h index 817089f23796ba218988205e939adae8cdc97d37..c2f0d582798b3d8653bd57fe3cc97f2db24745de 100644 --- a/source/dnode/vnode/src/inc/tsdb.h +++ b/source/dnode/vnode/src/inc/tsdb.h @@ -88,9 +88,8 @@ typedef struct SLDataIter SLDataIter; static FORCE_INLINE int64_t tsdbLogicToFileSize(int64_t lSize, int32_t szPage) { int64_t fOffSet = LOGIC_TO_FILE_OFFSET(lSize, szPage); int64_t pgno = OFFSET_PGNO(fOffSet, szPage); - int32_t szPageCont = PAGE_CONTENT_SIZE(szPage); - if (fOffSet % szPageCont == 0) { + if (fOffSet % szPage == 0) { pgno--; } @@ -285,8 +284,8 @@ int32_t tsdbDelFReaderClose(SDelFReader **ppReader); int32_t tsdbReadDelData(SDelFReader *pReader, SDelIdx *pDelIdx, SArray *aDelData); int32_t tsdbReadDelIdx(SDelFReader *pReader, SArray *aDelIdx); // tsdbRead.c ============================================================================================== -int32_t tsdbTakeReadSnap(STsdb *pTsdb, STsdbReadSnap **ppSnap, const char* id); -void tsdbUntakeReadSnap(STsdb *pTsdb, STsdbReadSnap *pSnap, const char* id); +int32_t tsdbTakeReadSnap(STsdb *pTsdb, STsdbReadSnap **ppSnap, const char *id); +void tsdbUntakeReadSnap(STsdb *pTsdb, STsdbReadSnap *pSnap, const char *id); // tsdbMerge.c ============================================================================================== int32_t tsdbMerge(STsdb *pTsdb);