This commit is contained in:
Hongze Cheng 2021-11-02 17:54:55 +08:00
parent 36d3adc23f
commit 8fbd3f49ca
4 changed files with 21 additions and 8 deletions

View File

@ -16,12 +16,16 @@
#ifndef _TD_META_CACHE_H_
#define _TD_META_CACHE_H_
#include "rocksdb/c.h"
#include "meta.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef rocksdb_cache_t meta_cache_t;
int metaOpenCache(SMeta *pMeta);
void metaCloseCache(SMeta *pMeta);

View File

@ -16,12 +16,16 @@
#ifndef _TD_META_DB_H_
#define _TD_META_DB_H_
#include "rocksdb/c.h"
#include "meta.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef rocksdb_t meta_db_t;
int metaOpenDB(SMeta *pMeta);
void metaCloseDB(SMeta *pMeta);

View File

@ -16,8 +16,9 @@
#ifndef _TD_META_DEF_H_
#define _TD_META_DEF_H_
#include "rocksdb/c.h"
#include "metaCache.h"
#include "metaDB.h"
#include "metaIdx.h"
#include "metaTbUid.h"
#ifdef __cplusplus
@ -25,11 +26,11 @@ extern "C" {
#endif
struct SMeta {
char * path; // path of current meta
char* path; // path of current meta
SMetaOptions options; // meta option
rocksdb_t * pDB;
rocksdb_t * pIdx;
rocksdb_cache_t *pCache;
meta_db_t* pDB; // raw data db
meta_index_t* pIdx; // tag index
meta_cache_t* pCache; // LRU cache
STbUidGenerator uidGnrt; // meta table UID generator
};

View File

@ -16,12 +16,16 @@
#ifndef _TD_META_IDX_H_
#define _TD_META_IDX_H_
#include "rocksdb/c.h"
#include "meta.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef rocksdb_t meta_index_t;
int metaOpenIdx(SMeta *pMeta);
void metaCloseIdx(SMeta *pMeta);