diff --git a/source/dnode/vnode/src/inc/metaDef.h b/source/dnode/vnode/src/inc/meta.h similarity index 94% rename from source/dnode/vnode/src/inc/metaDef.h rename to source/dnode/vnode/src/inc/meta.h index 8d624945b2da34c06d79eb93cbc7ea391626ea8b..b04364daf861c32b33a5e4f7a13f56f9ccf25b29 100644 --- a/source/dnode/vnode/src/inc/metaDef.h +++ b/source/dnode/vnode/src/inc/meta.h @@ -13,11 +13,8 @@ * along with this program. If not, see . */ -#ifndef _TD_META_DEF_H_ -#define _TD_META_DEF_H_ - -#include "tmallocator.h" -#include "vnode.h" +#ifndef _TD_VNODE_META_H_ +#define _TD_VNODE_META_H_ #ifdef __cplusplus extern "C" { @@ -77,4 +74,4 @@ struct SMeta { } #endif -#endif /*_TD_META_DEF_H_*/ +#endif /*_TD_VNODE_META_H_*/ \ No newline at end of file diff --git a/source/dnode/vnode/src/inc/tqCommit.h b/source/dnode/vnode/src/inc/tq.h similarity index 81% rename from source/dnode/vnode/src/inc/tqCommit.h rename to source/dnode/vnode/src/inc/tq.h index f2f48bbc8a69a022d0fc6b8a88c5a9a55d0b4ad6..573fc78df01236c6e6ab7d2d1f94a5dfe6897c0d 100644 --- a/source/dnode/vnode/src/inc/tqCommit.h +++ b/source/dnode/vnode/src/inc/tq.h @@ -12,3 +12,16 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ + +#ifndef _TD_VNODE_TQ_H_ +#define _TD_VNODE_TQ_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} +#endif + +#endif /*_TD_VNODE_TQ_H_*/ \ No newline at end of file diff --git a/source/dnode/vnode/src/inc/tsdb.h b/source/dnode/vnode/src/inc/tsdb.h new file mode 100644 index 0000000000000000000000000000000000000000..0ed2a6dc1151c554015f08bfa49ac8e5f2f14007 --- /dev/null +++ b/source/dnode/vnode/src/inc/tsdb.h @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2019 TAOS Data, Inc. + * + * This program is free software: you can use, redistribute, and/or modify + * it under the terms of the GNU Affero General Public License, version 3 + * or later ("AGPL"), as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +#ifndef _TD_VNODE_TSDB_H_ +#define _TD_VNODE_TSDB_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} +#endif + +#endif /*_TD_VNODE_TSDB_H_*/ \ No newline at end of file diff --git a/source/dnode/vnode/src/inc/vnodeInt.h b/source/dnode/vnode/src/inc/vnodeInt.h index 598c8c07bcf20c95de14db1c57011aa9f2f56b3b..8b9f0d9a8aaa5743b8f58cadf21dd641e1cfb6a2 100644 --- a/source/dnode/vnode/src/inc/vnodeInt.h +++ b/source/dnode/vnode/src/inc/vnodeInt.h @@ -205,6 +205,12 @@ int32_t tqProcessStreamTrigger(STQ* pTq, void* data, int32_t dataLen, int32_t wo // sma void smaHandleRes(void* pVnode, int64_t smaId, const SArray* data); +#include "meta.h" + +#include "tsdb.h" + +#include "tq.h" + #ifdef __cplusplus } #endif diff --git a/source/dnode/vnode/src/meta/metaCache.c b/source/dnode/vnode/src/meta/metaCache.c index aeb7dfc0398b0891b6466d8d82962dca18bdb5ac..e1507a3757f017a67810e762123efbdf160ab513 100644 --- a/source/dnode/vnode/src/meta/metaCache.c +++ b/source/dnode/vnode/src/meta/metaCache.c @@ -13,8 +13,7 @@ * along with this program. If not, see . */ -#include "vnode.h" -#include "metaDef.h" +#include "vnodeInt.h" struct SMetaCache { // TODO diff --git a/source/dnode/vnode/src/meta/metaCfg.c b/source/dnode/vnode/src/meta/metaCfg.c index cbaac1c409f7a4cccb8dde32f3590d1b4b737aa3..a5fcb32698d3fdd9ac6795eaab789b6bfbb0bebb 100644 --- a/source/dnode/vnode/src/meta/metaCfg.c +++ b/source/dnode/vnode/src/meta/metaCfg.c @@ -13,7 +13,7 @@ * along with this program. If not, see . */ -#include "metaDef.h" +#include "vnodeInt.h" const SMetaCfg defaultMetaOptions = {.lruSize = 0}; diff --git a/source/dnode/vnode/src/meta/metaIdx.c b/source/dnode/vnode/src/meta/metaIdx.c index 818da147381c46f1aab1816407861565f071bd81..9a566f788c8733ae0dd20065012ea0f3a30f1385 100644 --- a/source/dnode/vnode/src/meta/metaIdx.c +++ b/source/dnode/vnode/src/meta/metaIdx.c @@ -16,7 +16,7 @@ #ifdef USE_INVERTED_INDEX #include "index.h" #endif -#include "metaDef.h" +#include "vnodeInt.h" struct SMetaIdx { #ifdef USE_INVERTED_INDEX diff --git a/source/dnode/vnode/src/meta/metaMain.c b/source/dnode/vnode/src/meta/metaMain.c index 690b96bbb058a7a74b122a73d9b604da8c18d8bb..ac47c32cbf02131d353541eedb026a61b39bbdf1 100644 --- a/source/dnode/vnode/src/meta/metaMain.c +++ b/source/dnode/vnode/src/meta/metaMain.c @@ -15,7 +15,7 @@ #include "tcoding.h" -#include "metaDef.h" +#include "vnodeInt.h" static SMeta *metaNew(const char *path, const SMetaCfg *pMetaCfg, SMemAllocatorFactory *pMAF); static void metaFree(SMeta *pMeta); diff --git a/source/dnode/vnode/src/meta/metaTDBImpl.c b/source/dnode/vnode/src/meta/metaTDBImpl.c index 36b3b53ccdfe03e886c8a8dcc55e672226c626b3..c78691e7c25099d3e96bac5f7412aba9ac7da230 100644 --- a/source/dnode/vnode/src/meta/metaTDBImpl.c +++ b/source/dnode/vnode/src/meta/metaTDBImpl.c @@ -13,7 +13,7 @@ * along with this program. If not, see . */ -#include "metaDef.h" +#include "vnodeInt.h" #include "tdbInt.h" typedef struct SPoolMem { diff --git a/source/dnode/vnode/src/meta/metaTable.c b/source/dnode/vnode/src/meta/metaTable.c index 5977ad832c690e5ceb663476dee67b2f42aea7ab..7f06ba88553b0e211db7f79f0e09d87dc2958277 100644 --- a/source/dnode/vnode/src/meta/metaTable.c +++ b/source/dnode/vnode/src/meta/metaTable.c @@ -13,7 +13,7 @@ * along with this program. If not, see . */ -#include "metaDef.h" +#include "vnodeInt.h" int metaCreateTable(SMeta *pMeta, STbCfg *pTbCfg) { // Validate the tbOptions diff --git a/source/dnode/vnode/src/meta/metaTbCfg.c b/source/dnode/vnode/src/meta/metaTbCfg.c index d71d319a79d4ddd2dc94fb388bbac7030b9ad955..8ecc808786992bfe436716105fec9640b404e680 100644 --- a/source/dnode/vnode/src/meta/metaTbCfg.c +++ b/source/dnode/vnode/src/meta/metaTbCfg.c @@ -13,7 +13,7 @@ * along with this program. If not, see . */ -#include "metaDef.h" +#include "vnodeInt.h" #include "tcoding.h" int metaValidateTbCfg(SMeta *pMeta, const STbCfg *pTbOptions) { diff --git a/source/dnode/vnode/src/meta/metaTbUid.c b/source/dnode/vnode/src/meta/metaTbUid.c index e4ab36ec03787222d6820c717374106adaab2804..27a2ecfb195c300998246f52c145bb08d0bf311e 100644 --- a/source/dnode/vnode/src/meta/metaTbUid.c +++ b/source/dnode/vnode/src/meta/metaTbUid.c @@ -13,8 +13,7 @@ * along with this program. If not, see . */ -#include "vnode.h" -#include "metaDef.h" +#include "vnodeInt.h" int metaOpenUidGnrt(SMeta *pMeta) { // Init a generator diff --git a/source/dnode/vnode/test/tsdbSmaTest.cpp b/source/dnode/vnode/test/tsdbSmaTest.cpp index 37e2f188cdf2b83496b98403af7559ccd633ba6f..208493bdf66bc38df5cd6e159117fa5619cb17a5 100644 --- a/source/dnode/vnode/test/tsdbSmaTest.cpp +++ b/source/dnode/vnode/test/tsdbSmaTest.cpp @@ -20,7 +20,7 @@ #include #include -#include +#include #include #pragma GCC diagnostic push