Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
c9118a52
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1184
Star
22015
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c9118a52
编写于
1月 13, 2022
作者:
H
Hongze Cheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
more tkv and refact
上级
093b982f
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
22 addition
and
70 deletion
+22
-70
source/dnode/mgmt/impl/src/dndEnv.c
source/dnode/mgmt/impl/src/dndEnv.c
+1
-1
source/dnode/vnode/inc/vnode.h
source/dnode/vnode/inc/vnode.h
+0
-18
source/libs/tdb/inc/tdb.h
source/libs/tdb/inc/tdb.h
+13
-2
source/libs/tdb/src/inc/tdbDB.h
source/libs/tdb/src/inc/tdbDB.h
+3
-8
source/libs/tdb/src/inc/tdbEnv.h
source/libs/tdb/src/inc/tdbEnv.h
+0
-31
source/libs/tdb/test/tDiskMgrTest.cpp
source/libs/tdb/test/tDiskMgrTest.cpp
+0
-10
source/libs/tdb/test/tdbTest.cpp
source/libs/tdb/test/tdbTest.cpp
+5
-0
source/libs/tdb/test/tkvTests.cpp
source/libs/tdb/test/tkvTests.cpp
+0
-0
未找到文件。
source/dnode/mgmt/impl/src/dndEnv.c
浏览文件 @
c9118a52
...
...
@@ -293,7 +293,7 @@ int32_t dndInit(const SDnodeEnvCfg *pCfg) {
if
(
vnodeInit
(
&
vnodeOpt
)
!=
0
)
{
dError
(
"failed to init vnode since %s"
,
terrstr
());
dndCleanup
();
return
NULL
;
return
-
1
;
}
memcpy
(
&
dndEnv
.
cfg
,
pCfg
,
sizeof
(
SDnodeEnvCfg
));
...
...
source/dnode/vnode/inc/vnode.h
浏览文件 @
c9118a52
...
...
@@ -37,36 +37,18 @@ typedef int32_t (*PutReqToVQueryQFp)(SDnode *pDnode, struct SRpcMsg *pReq);
typedef
struct
SVnodeCfg
{
int32_t
vgId
;
SDnode
*
pDnode
;
/** vnode buffer pool options */
struct
{
/** write buffer size */
uint64_t
wsize
;
uint64_t
ssize
;
uint64_t
lsize
;
/** use heap allocator or arena allocator */
bool
isHeapAllocator
;
};
/** time to live of tables in this vnode */
uint32_t
ttl
;
/** data to keep in this vnode */
uint32_t
keep
;
/** if TS data is eventually consistency */
bool
isWeak
;
/** TSDB config */
STsdbCfg
tsdbCfg
;
/** META config */
SMetaCfg
metaCfg
;
/** TQ config */
STqCfg
tqCfg
;
/** WAL config */
SWalCfg
walCfg
;
}
SVnodeCfg
;
...
...
source/libs/tdb/inc/tdb.h
浏览文件 @
c9118a52
...
...
@@ -22,9 +22,15 @@
extern
"C"
{
#endif
typedef
enum
{
TDB_BTREE
=
0
,
TDB_HASH
,
TDB_HEAP
,
}
tdb_db_t
;
// Forward declaration
typedef
struct
TDB
TDB
;
typedef
struct
TDB_
ENV
TDB_ENV
;
typedef
struct
TDB
TDB
;
typedef
struct
TDB_
CURSOR
TDB_CURSOR
;
// SKey
typedef
struct
{
...
...
@@ -32,6 +38,11 @@ typedef struct {
uint32_t
size
;
}
TDB_KEY
,
TDB_VALUE
;
// TDB Operations
int
tdbCreateDB
(
TDB
**
dbpp
);
int
tdbOpenDB
(
TDB
*
dbp
,
tdb_db_t
type
,
uint32_t
flags
);
int
tdbCloseDB
(
TDB
*
dbp
,
uint32_t
flags
);
#ifdef __cplusplus
}
#endif
...
...
source/libs/tdb/src/inc/tdbDB.h
浏览文件 @
c9118a52
...
...
@@ -23,19 +23,14 @@
extern
"C"
{
#endif
typedef
enum
{
TDB_BTREE
=
0
,
TDB_HASH
,
TDB_HEAP
,
}
tdb_db_t
;
struct
TDB
{
pgsize_t
pageSize
;
tdb_db_t
type
;
union
{
STkvBtree
btree
;
STkvhash
hash
;
}
db
impl
;
TDB_BTREE
btree
;
TDB_HASH
hash
;
}
db
am
;
// Different access methods
};
#ifdef __cplusplus
...
...
source/libs/tdb/src/inc/tdbEnv.h
已删除
100644 → 0
浏览文件 @
093b982f
/*
* 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_TDB_ENV_H_
#define _TD_TDB_ENV_H_
#ifdef __cplusplus
extern
"C"
{
#endif
struct
TDB_ENV
{
char
*
homeDir
;
};
#ifdef __cplusplus
}
#endif
#endif
/*_TD_TDB_ENV_H_*/
\ No newline at end of file
source/libs/tdb/test/tDiskMgrTest.cpp
已删除
100644 → 0
浏览文件 @
093b982f
#include "gtest/gtest.h"
#include "iostream"
#include "tDiskMgr.h"
TEST
(
tDiskMgrTest
,
simple_test
)
{
// TODO
std
::
cout
<<
"This is in tDiskMgrTest::simple_test"
<<
std
::
endl
;
}
\ No newline at end of file
source/libs/tdb/test/tdbTest.cpp
0 → 100644
浏览文件 @
c9118a52
#include "gtest/gtest.h"
TEST
(
tdb_api_test
,
tdb_create_open_close_db_test
)
{
}
\ No newline at end of file
source/libs/tdb/test/tkvTests.cpp
已删除
100644 → 0
浏览文件 @
093b982f
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录