Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
2bab3850
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1192
Star
22018
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看板
提交
2bab3850
编写于
4月 03, 2023
作者:
H
Hongze Cheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
more code
上级
7e48fc3c
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
87 addition
and
18 deletion
+87
-18
source/dnode/vnode/src/tsdb/dev/dev.h
source/dnode/vnode/src/tsdb/dev/dev.h
+2
-0
source/dnode/vnode/src/tsdb/dev/tsdbCommit.c
source/dnode/vnode/src/tsdb/dev/tsdbCommit.c
+2
-1
source/dnode/vnode/src/tsdb/dev/tsdbFile.c
source/dnode/vnode/src/tsdb/dev/tsdbFile.c
+0
-17
source/dnode/vnode/src/tsdb/dev/tsdbFileOp.h
source/dnode/vnode/src/tsdb/dev/tsdbFileOp.h
+45
-0
source/dnode/vnode/src/tsdb/dev/tsdbMerge.c
source/dnode/vnode/src/tsdb/dev/tsdbMerge.c
+38
-0
未找到文件。
source/dnode/vnode/src/tsdb/dev/dev.h
浏览文件 @
2bab3850
...
...
@@ -26,6 +26,8 @@ extern "C" {
#include "tsdbFile.h"
#include "tsdbFileOp.h"
#include "tsdbFS.h"
#include "tsdbSttFWriter.h"
...
...
source/dnode/vnode/src/tsdb/dev/tsdbCommit.c
浏览文件 @
2bab3850
...
...
@@ -33,6 +33,7 @@ typedef struct {
TSKEY
minKey
;
TSKEY
maxKey
;
// writer
SArray
*
aFileOp
;
struct
SSttFWriter
*
pWriter
;
}
SCommitter
;
...
...
@@ -358,7 +359,7 @@ _exit:
return code;
}
int32_t tsdbCommit
Rollback
(STsdb *pTsdb) {
int32_t tsdbCommit
Abort
(STsdb *pTsdb) {
int32_t code = 0;
int32_t lino = 0;
...
...
source/dnode/vnode/src/tsdb/dev/tsdbFile.c
浏览文件 @
2bab3850
...
...
@@ -15,15 +15,6 @@
#include "dev.h"
typedef
enum
{
TSDB_FOP_CREATE
=
-
2
,
// create a file
TSDB_FOP_EXTEND
,
// extend a file
TSDB_FOP_NONE
,
// no operation
TSDB_FOP_TRUNCATE
,
// truncate a file
TSDB_FOP_DELETE
,
// delete a file
TSDB_FOP_MAX
,
}
tsdb_fop_t
;
const
char
*
tsdb_ftype_suffix
[]
=
{
".head"
,
// TSDB_FTYPE_HEAD
".data"
,
// TSDB_FTYPE_DATA
...
...
@@ -33,14 +24,6 @@ const char *tsdb_ftype_suffix[] = {
".stt"
,
};
struct
SFileOp
{
tsdb_fop_t
op
;
union
{
struct
{
}
create
;
};
};
int32_t
tsdbTFileInit
(
STsdb
*
pTsdb
,
struct
STFile
*
pFile
)
{
SVnode
*
pVnode
=
pTsdb
->
pVnode
;
STfs
*
pTfs
=
pVnode
->
pTfs
;
...
...
source/dnode/vnode/src/tsdb/dev/tsdbFileOp.h
0 → 100644
浏览文件 @
2bab3850
/*
* 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 _TSDB_FILE_OP_H
#define _TSDB_FILE_OP_H
#ifdef __cplusplus
extern
"C"
{
#endif
/* Exposed Handle */
typedef
enum
{
TSDB_FOP_EXTEND
=
-
2
,
TSDB_FOP_CREATE
,
TSDB_FOP_NONE
,
TSDB_FOP_DELETE
,
TSDB_FOP_TRUNCATE
,
}
EFileOpType
;
struct
SFileOp
{
EFileOpType
op
;
// TODO
};
/* Exposed APIs */
/* Exposed Structs */
#ifdef __cplusplus
}
#endif
#endif
/*_TSDB_FILE_OP_H*/
\ No newline at end of file
source/dnode/vnode/src/tsdb/dev/tsdbMerge.c
0 → 100644
浏览文件 @
2bab3850
/*
* 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 "dev.h"
typedef
struct
{
STsdb
*
pTsdb
;
}
SMerger
;
int32_t
tsdbMergeBegin
(
STsdb
*
pTsdb
)
{
int32_t
code
=
0
;
// TODO
return
code
;
}
int32_t
tsdbMergeCommit
(
STsdb
*
pTsdb
)
{
int32_t
code
=
0
;
// TODO
return
code
;
}
int32_t
tsdbMergeAbort
(
STsdb
*
pTsdb
)
{
int32_t
code
=
0
;
// TODO
return
code
;
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录