Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
36d3adc2
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
36d3adc2
编写于
11月 02, 2021
作者:
H
Hongze Cheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refact
上级
5469e938
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
125 addition
and
14 deletion
+125
-14
source/dnode/vnode/meta/inc/metaCache.h
source/dnode/vnode/meta/inc/metaCache.h
+32
-0
source/dnode/vnode/meta/inc/metaDB.h
source/dnode/vnode/meta/inc/metaDB.h
+0
-9
source/dnode/vnode/meta/inc/metaDef.h
source/dnode/vnode/meta/inc/metaDef.h
+8
-5
source/dnode/vnode/meta/inc/metaIdx.h
source/dnode/vnode/meta/inc/metaIdx.h
+32
-0
source/dnode/vnode/meta/src/metaCache.c
source/dnode/vnode/meta/src/metaCache.c
+26
-0
source/dnode/vnode/meta/src/metaDB.c
source/dnode/vnode/meta/src/metaDB.c
+4
-0
source/dnode/vnode/meta/src/metaIdx.c
source/dnode/vnode/meta/src/metaIdx.c
+23
-0
未找到文件。
source/dnode/vnode/meta/inc/metaCache.h
0 → 100644
浏览文件 @
36d3adc2
/*
* 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_META_CACHE_H_
#define _TD_META_CACHE_H_
#include "meta.h"
#ifdef __cplusplus
extern
"C"
{
#endif
int
metaOpenCache
(
SMeta
*
pMeta
);
void
metaCloseCache
(
SMeta
*
pMeta
);
#ifdef __cplusplus
}
#endif
#endif
/*_TD_META_CACHE_H_*/
\ No newline at end of file
source/dnode/vnode/meta/inc/metaDB.h
浏览文件 @
36d3adc2
...
...
@@ -17,20 +17,11 @@
#define _TD_META_DB_H_
#include "meta.h"
// #include "tkv.h"
#include "rocksdb/c.h"
#ifdef __cplusplus
extern
"C"
{
#endif
typedef
struct
SMetaDB
{
rocksdb_t
*
pDB
;
rocksdb_t
*
pIdx
;
rocksdb_cache_t
*
pCache
;
}
SMetaDB
;
int
metaOpenDB
(
SMeta
*
pMeta
);
void
metaCloseDB
(
SMeta
*
pMeta
);
...
...
source/dnode/vnode/meta/inc/metaDef.h
浏览文件 @
36d3adc2
...
...
@@ -16,7 +16,8 @@
#ifndef _TD_META_DEF_H_
#define _TD_META_DEF_H_
#include "metaDB.h"
#include "rocksdb/c.h"
#include "metaTbUid.h"
#ifdef __cplusplus
...
...
@@ -24,10 +25,12 @@ extern "C" {
#endif
struct
SMeta
{
char
*
path
;
// path of current meta
SMetaOptions
options
;
// meta option
SMetaDB
metaDB
;
// meta DB for real storage engine
STbUidGenerator
uidGnrt
;
// meta table UID generator
char
*
path
;
// path of current meta
SMetaOptions
options
;
// meta option
rocksdb_t
*
pDB
;
rocksdb_t
*
pIdx
;
rocksdb_cache_t
*
pCache
;
STbUidGenerator
uidGnrt
;
// meta table UID generator
};
#ifdef __cplusplus
...
...
source/dnode/vnode/meta/inc/metaIdx.h
0 → 100644
浏览文件 @
36d3adc2
/*
* 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_META_IDX_H_
#define _TD_META_IDX_H_
#include "meta.h"
#ifdef __cplusplus
extern
"C"
{
#endif
int
metaOpenIdx
(
SMeta
*
pMeta
);
void
metaCloseIdx
(
SMeta
*
pMeta
);
#ifdef __cplusplus
}
#endif
#endif
/*_TD_META_IDX_H_*/
\ No newline at end of file
source/dnode/vnode/meta/src/metaCache.c
0 → 100644
浏览文件 @
36d3adc2
/*
* 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/>.
*/
#include "meta.h"
#include "metaDef.h"
int
metaOpenCache
(
SMeta
*
pMeta
)
{
// TODO
return
0
;
}
void
metaCloseCache
(
SMeta
*
pMeta
)
{
// TODO
}
\ No newline at end of file
source/dnode/vnode/meta/src/metaDB.c
浏览文件 @
36d3adc2
...
...
@@ -17,6 +17,7 @@
#include "metaDef.h"
int
metaOpenDB
(
SMeta
*
pMeta
)
{
#if 0
char * err = NULL;
rocksdb_options_t *dbOptions;
rocksdb_options_t *idxOptions;
...
...
@@ -69,10 +70,12 @@ int metaOpenDB(SMeta *pMeta) {
rocksdb_options_destroy(idxOptions);
#endif
return
0
;
}
void
metaCloseDB
(
SMeta
*
pMeta
)
{
/* TODO */
#if 0
// Close index DB
if (pMeta->metaDB.pIdx) {
rocksdb_close(pMeta->metaDB.pIdx);
...
...
@@ -87,4 +90,5 @@ void metaCloseDB(SMeta *pMeta) { /* TODO */
if (pMeta->metaDB.pCache) {
rocksdb_cache_destroy(pMeta->metaDB.pCache);
}
#endif
}
\ No newline at end of file
source/dnode/vnode/meta/src/metaIdx.c
0 → 100644
浏览文件 @
36d3adc2
/*
* 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/>.
*/
#include "metaIdx.h"
int
metaOpenIdx
(
SMeta
*
pMeta
)
{
/* TODO */
return
0
;
}
void
metaCloseIdx
(
SMeta
*
pMeta
)
{
/* TODO */
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录