diff --git a/include/server/vnode/tsdb/impl/tsdbImpl.h b/include/server/vnode/tsdb/impl/tsdbImpl.h index 15f611c7032e99bf13db74b64ee20dffcb76a530..04d2ec43c9acc0d42fc5d11a75e95d1e80498c61 100644 --- a/include/server/vnode/tsdb/impl/tsdbImpl.h +++ b/include/server/vnode/tsdb/impl/tsdbImpl.h @@ -23,6 +23,7 @@ extern "C" { #endif struct STsdbOptions { + size_t lruCacheSize; /* TODO */ }; diff --git a/source/dnode/vnode/tsdb/inc/tsdbOptions.h b/source/dnode/vnode/tsdb/inc/tsdbOptions.h index 4d6a250424d4f7314a518b27c04708cc294d7ddd..a1864829399c7cdccad598b2e68d3209a919c8b5 100644 --- a/source/dnode/vnode/tsdb/inc/tsdbOptions.h +++ b/source/dnode/vnode/tsdb/inc/tsdbOptions.h @@ -20,6 +20,10 @@ extern "C" { #endif +extern const STsdbOptions defautlTsdbOptions; + +int tsdbValidateOptions(const STsdbOptions *); + #ifdef __cplusplus } #endif diff --git a/source/dnode/vnode/tsdb/src/tsdbMain.c b/source/dnode/vnode/tsdb/src/tsdbMain.c index 61e887dd459bf0ac0d9aaa4ffd39bf1af0a1e153..9f473c3be1a9e339eb9ee441fb4c2ee579cf16b6 100644 --- a/source/dnode/vnode/tsdb/src/tsdbMain.c +++ b/source/dnode/vnode/tsdb/src/tsdbMain.c @@ -13,4 +13,20 @@ * along with this program. If not, see . */ -#include "tsdbDef.h" \ No newline at end of file +#include "tsdbDef.h" + +STsdb *tsdbOpen(const char *path, const STsdbOptions *pTsdbOptions) { + STsdb *pTsdb = NULL; + /* TODO */ + return pTsdb; +} + +void tsdbClose(STsdb *pTsdb) { + if (pTsdb) { + /* TODO */ + } +} + +void tsdbRemove(const char *path) { taosRemoveDir(path); } + +/* ------------------------ STATIC METHODS ------------------------ */ \ No newline at end of file diff --git a/source/dnode/vnode/tsdb/src/tsdbOptions.c b/source/dnode/vnode/tsdb/src/tsdbOptions.c index 6dea4a4e57392be988126c579648f39a8270b9bf..1e1a8592852fd91ab53f43a94586dca63e2fd8eb 100644 --- a/source/dnode/vnode/tsdb/src/tsdbOptions.c +++ b/source/dnode/vnode/tsdb/src/tsdbOptions.c @@ -11,4 +11,22 @@ * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . - */ \ No newline at end of file + */ + +#include "tsdbDef.h" + +const STsdbOptions defautlTsdbOptions = {.lruCacheSize = 0}; + +int tsdbOptionsInit(STsdbOptions *pTsdbOptions) { + // TODO + return 0; +} + +void tsdbOptionsClear(STsdbOptions *pTsdbOptions) { + // TODO +} + +int tsdbValidateOptions(const STsdbOptions *pTsdbOptions) { + // TODO + return 0; +}