diff --git a/include/server/vnode/memtable/memTable.h b/include/server/vnode/memtable/memTable.h deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/include/server/vnode/tsdb/tsdb.h b/include/server/vnode/tsdb/tsdb.h index 8bca3590c0..988669324e 100644 --- a/include/server/vnode/tsdb/tsdb.h +++ b/include/server/vnode/tsdb/tsdb.h @@ -24,16 +24,32 @@ extern "C" { typedef struct STsdb STsdb; typedef struct { + int32_t id; // TODO: use a global definition + int32_t days; + int32_t keep; + int32_t keep1; + int32_t keep2; + int32_t minRows; + int32_t maxRows; + int8_t precision; + int8_t update; } STsdbCfg; -int tsdbInit(int nthreads); -int tsdbClear(); +// Module init and clear +int tsdbInit(); +int tsdbClear(); + +// Repository operations int tsdbCreateRepo(int id); int tsdbDropRepo(int id); STsdb *tsdbOpenRepo(STsdbCfg *pCfg); int tsdbCloseRepo(STsdb *pTsdb); int tsdbForceCloseRepo(STsdb *pTsdb); +// Data commit +int tsdbInsert(STsdb *pTsdb, SSubmitMsg *pMsg); +int tsdbCommit(STsdb *pTsdb); + #ifdef __cplusplus } #endif diff --git a/source/server/vnode/tsdb/CMakeLists.txt b/source/server/vnode/tsdb/CMakeLists.txt index 19ad9e1591..3c1dc5810b 100644 --- a/source/server/vnode/tsdb/CMakeLists.txt +++ b/source/server/vnode/tsdb/CMakeLists.txt @@ -4,4 +4,8 @@ target_include_directories( tsdb PUBLIC "${CMAKE_SOURCE_DIR}/include/server/vnode/tsdb" PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" +) +target_include_directories( + tsdb + PRIVATE os ) \ No newline at end of file