Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
dc10b019
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1192
Star
22018
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看板
提交
dc10b019
编写于
3月 28, 2023
作者:
H
Hongze Cheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
more code
上级
03fe43db
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
42 addition
and
14 deletion
+42
-14
source/dnode/vnode/src/tsdb/dev/tsdbCommit.c
source/dnode/vnode/src/tsdb/dev/tsdbCommit.c
+15
-2
source/dnode/vnode/src/tsdb/dev/tsdbFS.c
source/dnode/vnode/src/tsdb/dev/tsdbFS.c
+0
-6
source/dnode/vnode/src/tsdb/dev/tsdbFS.h
source/dnode/vnode/src/tsdb/dev/tsdbFS.h
+5
-0
source/dnode/vnode/src/tsdb/dev/tsdbFSet.c
source/dnode/vnode/src/tsdb/dev/tsdbFSet.c
+0
-5
source/dnode/vnode/src/tsdb/dev/tsdbFSet.h
source/dnode/vnode/src/tsdb/dev/tsdbFSet.h
+8
-0
source/dnode/vnode/src/tsdb/dev/tsdbFile.c
source/dnode/vnode/src/tsdb/dev/tsdbFile.c
+12
-1
source/dnode/vnode/src/tsdb/dev/tsdbFile.h
source/dnode/vnode/src/tsdb/dev/tsdbFile.h
+2
-0
未找到文件。
source/dnode/vnode/src/tsdb/dev/tsdbCommit.c
浏览文件 @
dc10b019
...
@@ -42,7 +42,6 @@ static int32_t tsdbCommitOpenWriter(SCommitter *pCommitter) {
...
@@ -42,7 +42,6 @@ static int32_t tsdbCommitOpenWriter(SCommitter *pCommitter) {
struct
SSttFWriterConf
conf
=
{
struct
SSttFWriterConf
conf
=
{
.
pTsdb
=
pCommitter
->
pTsdb
,
.
pTsdb
=
pCommitter
->
pTsdb
,
.
file
=
{
0
},
.
pSkmTb
=
NULL
,
.
pSkmTb
=
NULL
,
.
pSkmRow
=
NULL
,
.
pSkmRow
=
NULL
,
.
maxRow
=
pCommitter
->
maxRow
,
.
maxRow
=
pCommitter
->
maxRow
,
...
@@ -51,7 +50,21 @@ static int32_t tsdbCommitOpenWriter(SCommitter *pCommitter) {
...
@@ -51,7 +50,21 @@ static int32_t tsdbCommitOpenWriter(SCommitter *pCommitter) {
.
aBuf
=
NULL
,
.
aBuf
=
NULL
,
};
};
// taosArraySearch(pCommitter->pTsdb);
// pCommitter->pTsdb->pFS = NULL;
// taosbsearch(pCommitter->pTsdb->pFS->aFileSet, &pCommitter->fid, tsdbCompareFid, &lino);
struct
SFileSet
*
pSet
=
NULL
;
if
(
pSet
==
NULL
)
{
conf
.
file
=
(
struct
STFile
){
.
cid
=
1
,
.
fid
=
pCommitter
->
fid
,
.
diskId
=
(
SDiskID
){
0
},
.
type
=
TSDB_FTYPE_STT
,
};
tsdbTFileInit
(
pCommitter
->
pTsdb
,
&
conf
.
file
);
}
else
{
// TODO
ASSERT
(
0
);
}
code
=
tsdbSttFWriterOpen
(
&
conf
,
&
pCommitter
->
pWriter
);
code
=
tsdbSttFWriterOpen
(
&
conf
,
&
pCommitter
->
pWriter
);
TSDB_CHECK_CODE
(
code
,
lino
,
_exit
);
TSDB_CHECK_CODE
(
code
,
lino
,
_exit
);
...
...
source/dnode/vnode/src/tsdb/dev/tsdbFS.c
浏览文件 @
dc10b019
...
@@ -15,12 +15,6 @@
...
@@ -15,12 +15,6 @@
#include "dev.h"
#include "dev.h"
struct
STFileSystem
{
STsdb
*
pTsdb
;
int32_t
nFileSet
;
struct
SFileSet
*
aFileSet
;
};
static
int32_t
create_file_system
(
STsdb
*
pTsdb
,
struct
STFileSystem
**
ppFS
)
{
static
int32_t
create_file_system
(
STsdb
*
pTsdb
,
struct
STFileSystem
**
ppFS
)
{
ppFS
[
0
]
=
taosMemoryCalloc
(
1
,
sizeof
(
*
ppFS
[
0
]));
ppFS
[
0
]
=
taosMemoryCalloc
(
1
,
sizeof
(
*
ppFS
[
0
]));
if
(
ppFS
[
0
]
==
NULL
)
return
TSDB_CODE_OUT_OF_MEMORY
;
if
(
ppFS
[
0
]
==
NULL
)
return
TSDB_CODE_OUT_OF_MEMORY
;
...
...
source/dnode/vnode/src/tsdb/dev/tsdbFS.h
浏览文件 @
dc10b019
...
@@ -30,6 +30,11 @@ int32_t tsdbOpenFileSystem(STsdb *pTsdb, struct STFileSystem **ppFS, int8_t roll
...
@@ -30,6 +30,11 @@ int32_t tsdbOpenFileSystem(STsdb *pTsdb, struct STFileSystem **ppFS, int8_t roll
int32_t
tsdbCloseFileSystem
(
struct
STFileSystem
**
ppFS
);
int32_t
tsdbCloseFileSystem
(
struct
STFileSystem
**
ppFS
);
/* Exposed Structs */
/* Exposed Structs */
struct
STFileSystem
{
STsdb
*
pTsdb
;
int32_t
nFileSet
;
struct
SFileSet
*
aFileSet
;
};
#ifdef __cplusplus
#ifdef __cplusplus
}
}
...
...
source/dnode/vnode/src/tsdb/dev/tsdbFSet.c
浏览文件 @
dc10b019
...
@@ -14,8 +14,3 @@
...
@@ -14,8 +14,3 @@
*/
*/
#include "dev.h"
#include "dev.h"
struct
SFileSet
{
struct
STFile
*
files
[
TSDB_FTYPE_MAX
];
SRBTree
fsttTree
;
};
\ No newline at end of file
source/dnode/vnode/src/tsdb/dev/tsdbFSet.h
浏览文件 @
dc10b019
...
@@ -16,6 +16,8 @@
...
@@ -16,6 +16,8 @@
#ifndef _TSDB_FILE_SET_H
#ifndef _TSDB_FILE_SET_H
#define _TSDB_FILE_SET_H
#define _TSDB_FILE_SET_H
#include "tsdb.h"
#ifdef __cplusplus
#ifdef __cplusplus
extern
"C"
{
extern
"C"
{
#endif
#endif
...
@@ -26,6 +28,12 @@ struct SFileSet;
...
@@ -26,6 +28,12 @@ struct SFileSet;
/* Exposed APIs */
/* Exposed APIs */
/* Exposed Structs */
/* Exposed Structs */
struct
SFileSet
{
int32_t
fid
;
int64_t
nextid
;
struct
STFile
*
files
[
TSDB_FTYPE_MAX
];
SRBTree
fsttTree
;
};
#ifdef __cplusplus
#ifdef __cplusplus
}
}
...
...
source/dnode/vnode/src/tsdb/dev/tsdbFile.c
浏览文件 @
dc10b019
...
@@ -34,4 +34,15 @@ struct SFileOp {
...
@@ -34,4 +34,15 @@ struct SFileOp {
struct
{
struct
{
}
create
;
}
create
;
};
};
};
};
\ No newline at end of file
int32_t
tsdbTFileInit
(
STsdb
*
pTsdb
,
struct
STFile
*
pFile
)
{
snprintf
(
pFile
->
fname
,
TSDB_FILENAME_LEN
,
"%s"
,
pTsdb
->
path
);
return
0
;
}
int32_t
tsdbTFileClear
(
struct
STFile
*
pFile
)
{
int32_t
code
=
0
;
// TODO
return
code
;
}
\ No newline at end of file
source/dnode/vnode/src/tsdb/dev/tsdbFile.h
浏览文件 @
dc10b019
...
@@ -36,6 +36,8 @@ typedef enum {
...
@@ -36,6 +36,8 @@ typedef enum {
}
tsdb_ftype_t
;
}
tsdb_ftype_t
;
/* Exposed APIs */
/* Exposed APIs */
int32_t
tsdbTFileInit
(
STsdb
*
pTsdb
,
struct
STFile
*
pFile
);
int32_t
tsdbTFileClear
(
struct
STFile
*
pFile
);
/* Exposed Structs */
/* Exposed Structs */
struct
FStt
{
struct
FStt
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录