more refact

This commit is contained in:
Hongze Cheng 2022-04-08 06:19:58 +00:00
parent 6faaafb7a2
commit 0e1a27c750
13 changed files with 58 additions and 17 deletions

View File

@ -13,11 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#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_*/

View File

@ -12,3 +12,16 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _TD_VNODE_TQ_H_
#define _TD_VNODE_TQ_H_
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
#endif /*_TD_VNODE_TQ_H_*/

View File

@ -0,0 +1,27 @@
/*
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
*
* 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 <http://www.gnu.org/licenses/>.
*/
#ifndef _TD_VNODE_TSDB_H_
#define _TD_VNODE_TSDB_H_
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
#endif /*_TD_VNODE_TSDB_H_*/

View File

@ -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

View File

@ -13,8 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "vnode.h"
#include "metaDef.h"
#include "vnodeInt.h"
struct SMetaCache {
// TODO

View File

@ -13,7 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "metaDef.h"
#include "vnodeInt.h"
const SMetaCfg defaultMetaOptions = {.lruSize = 0};

View File

@ -16,7 +16,7 @@
#ifdef USE_INVERTED_INDEX
#include "index.h"
#endif
#include "metaDef.h"
#include "vnodeInt.h"
struct SMetaIdx {
#ifdef USE_INVERTED_INDEX

View File

@ -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);

View File

@ -13,7 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "metaDef.h"
#include "vnodeInt.h"
#include "tdbInt.h"
typedef struct SPoolMem {

View File

@ -13,7 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "metaDef.h"
#include "vnodeInt.h"
int metaCreateTable(SMeta *pMeta, STbCfg *pTbCfg) {
// Validate the tbOptions

View File

@ -13,7 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "metaDef.h"
#include "vnodeInt.h"
#include "tcoding.h"
int metaValidateTbCfg(SMeta *pMeta, const STbCfg *pTbOptions) {

View File

@ -13,8 +13,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "vnode.h"
#include "metaDef.h"
#include "vnodeInt.h"
int metaOpenUidGnrt(SMeta *pMeta) {
// Init a generator

View File

@ -20,7 +20,7 @@
#include <tglobal.h>
#include <iostream>
#include <metaDef.h>
#include <vnodeInt.h>
#include <tmsg.h>
#pragma GCC diagnostic push