diff --git a/source/dnode/vnode/src/inc/metaDB.h b/source/dnode/vnode/src/inc/metaDB.h deleted file mode 100644 index b4b7e5d19e6df51b993487526b6733990a134b93..0000000000000000000000000000000000000000 --- a/source/dnode/vnode/src/inc/metaDB.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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_META_DB_H_ -#define _TD_META_DB_H_ - -#include "meta.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct SMetaDB SMetaDB; - -int metaOpenDB(SMeta *pMeta); -void metaCloseDB(SMeta *pMeta); -int metaSaveTableToDB(SMeta *pMeta, STbCfg *pTbCfg); -int metaRemoveTableFromDb(SMeta *pMeta, tb_uid_t uid); - -#ifdef __cplusplus -} -#endif - -#endif /*_TD_META_DB_H_*/ \ No newline at end of file diff --git a/source/dnode/vnode/src/inc/metaDef.h b/source/dnode/vnode/src/inc/metaDef.h index 82c74f47d28924486a2d58e3334ab488a591aa1e..b76c08b7b4a9a59081e3de6eac70b8e1aedafe15 100644 --- a/source/dnode/vnode/src/inc/metaDef.h +++ b/source/dnode/vnode/src/inc/metaDef.h @@ -19,7 +19,6 @@ #include "mallocator.h" #include "meta.h" -#include "metaDB.h" #ifdef __cplusplus extern "C" { @@ -27,6 +26,13 @@ extern "C" { typedef struct SMetaCache SMetaCache; typedef struct SMetaIdx SMetaIdx; +typedef struct SMetaDB SMetaDB; + +// SMetaDB +int metaOpenDB(SMeta* pMeta); +void metaCloseDB(SMeta* pMeta); +int metaSaveTableToDB(SMeta* pMeta, STbCfg* pTbCfg); +int metaRemoveTableFromDb(SMeta* pMeta, tb_uid_t uid); // SMetaCache int metaOpenCache(SMeta* pMeta); @@ -35,7 +41,7 @@ void metaCloseCache(SMeta* pMeta); // SMetaCfg extern const SMetaCfg defaultMetaOptions; // int metaValidateOptions(const SMetaCfg*); -void metaOptionsCopy(SMetaCfg* pDest, const SMetaCfg* pSrc); +void metaOptionsCopy(SMetaCfg* pDest, const SMetaCfg* pSrc); // SMetaIdx int metaOpenIdx(SMeta* pMeta); @@ -49,12 +55,12 @@ typedef struct STbUidGenerator { } STbUidGenerator; // STableUidGenerator -int metaOpenUidGnrt(SMeta *pMeta); -void metaCloseUidGnrt(SMeta *pMeta); +int metaOpenUidGnrt(SMeta* pMeta); +void metaCloseUidGnrt(SMeta* pMeta); // tb_uid_t #define IVLD_TB_UID 0 -tb_uid_t metaGenerateUid(SMeta *pMeta); +tb_uid_t metaGenerateUid(SMeta* pMeta); struct SMeta { char* path; diff --git a/source/dnode/vnode/src/inc/vnd.h b/source/dnode/vnode/src/inc/vnd.h index f74497d309cb0d4afc1e6bce8eed867ab79c28a5..7f43a93ab715e3303b4647d87886ad1ab0e23b38 100644 --- a/source/dnode/vnode/src/inc/vnd.h +++ b/source/dnode/vnode/src/inc/vnd.h @@ -13,8 +13,8 @@ * along with this program. If not, see . */ -#ifndef _TD_VND_H_ -#define _TD_VND_H_ +#ifndef _TD_VNODE_DEF_H_ +#define _TD_VNODE_DEF_H_ #include "mallocator.h" // #include "sync.h" @@ -176,4 +176,4 @@ bool vmaIsFull(SVMemAllocator* pVMA); } #endif -#endif /*_TD_VND_H_*/ \ No newline at end of file +#endif /*_TD_VNODE_DEF_H_*/ \ No newline at end of file diff --git a/source/dnode/vnode/src/meta/metaMain.c b/source/dnode/vnode/src/meta/metaMain.c index b6aa029b1919a6c5635b678657042d009e31472e..ad87b2de9ec0861293290a410b004395a882a6e3 100644 --- a/source/dnode/vnode/src/meta/metaMain.c +++ b/source/dnode/vnode/src/meta/metaMain.c @@ -30,11 +30,11 @@ SMeta *metaOpen(const char *path, const SMetaCfg *pMetaCfg, SMemAllocatorFactory pMetaCfg = &defaultMetaOptions; } - // Validate the options - if (metaValidateOptions(pMetaCfg) < 0) { - // TODO: deal with error - return NULL; - } + // // Validate the options + // if (metaValidateOptions(pMetaCfg) < 0) { + // // TODO: deal with error + // return NULL; + // } // Allocate handle pMeta = metaNew(path, pMetaCfg, pMAF);