Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
6835b689
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1185
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,发现更多精彩内容 >>
提交
6835b689
编写于
1月 10, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
minor changes
上级
ef05688e
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
49 addition
and
13 deletion
+49
-13
include/common/tcfg.h
include/common/tcfg.h
+35
-0
include/common/tglobal.h
include/common/tglobal.h
+1
-5
source/dnode/mgmt/impl/CMakeLists.txt
source/dnode/mgmt/impl/CMakeLists.txt
+1
-0
source/dnode/mgmt/impl/src/dnode.c
source/dnode/mgmt/impl/src/dnode.c
+12
-0
source/dnode/vnode/impl/src/vnodeMgr.c
source/dnode/vnode/impl/src/vnodeMgr.c
+0
-8
未找到文件。
include/common/tcfg.h
0 → 100644
浏览文件 @
6835b689
/*
* 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_COMMON_CFG_H_
#define _TD_COMMON_CFG_H_
#ifdef __cplusplus
extern
"C"
{
#endif
#include "tdef.h"
typedef
struct
{
char
dir
[
TSDB_FILENAME_LEN
];
int
level
;
int
primary
;
}
SDiskCfg
;
#ifdef __cplusplus
}
#endif
#endif
/*_TD_COMMON_CFG_H_*/
include/common/tglobal.h
浏览文件 @
6835b689
...
@@ -21,6 +21,7 @@ extern "C" {
...
@@ -21,6 +21,7 @@ extern "C" {
#endif
#endif
#include "tdef.h"
#include "tdef.h"
#include "tcfg.h"
// cluster
// cluster
extern
char
tsFirst
[];
extern
char
tsFirst
[];
...
@@ -105,11 +106,6 @@ extern uint32_t tsMaxRange;
...
@@ -105,11 +106,6 @@ extern uint32_t tsMaxRange;
extern
uint32_t
tsCurRange
;
extern
uint32_t
tsCurRange
;
extern
char
tsCompressor
[];
extern
char
tsCompressor
[];
typedef
struct
{
char
dir
[
TSDB_FILENAME_LEN
];
int
level
;
int
primary
;
}
SDiskCfg
;
extern
int32_t
tsDiskCfgNum
;
extern
int32_t
tsDiskCfgNum
;
extern
SDiskCfg
tsDiskCfg
[];
extern
SDiskCfg
tsDiskCfg
[];
...
...
source/dnode/mgmt/impl/CMakeLists.txt
浏览文件 @
6835b689
...
@@ -11,6 +11,7 @@ target_link_libraries(
...
@@ -11,6 +11,7 @@ target_link_libraries(
PUBLIC wal
PUBLIC wal
PUBLIC sync
PUBLIC sync
PUBLIC taos
PUBLIC taos
PUBLIC tfs
)
)
target_include_directories
(
target_include_directories
(
dnode
dnode
...
...
source/dnode/mgmt/impl/src/dnode.c
浏览文件 @
6835b689
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
#include "dndVnodes.h"
#include "dndVnodes.h"
#include "sync.h"
#include "sync.h"
#include "wal.h"
#include "wal.h"
#include "tfs.h"
EStat
dndGetStat
(
SDnode
*
pDnode
)
{
return
pDnode
->
stat
;
}
EStat
dndGetStat
(
SDnode
*
pDnode
)
{
return
pDnode
->
stat
;
}
...
@@ -185,6 +186,16 @@ SDnode *dndInit(SDnodeOpt *pOption) {
...
@@ -185,6 +186,16 @@ SDnode *dndInit(SDnodeOpt *pOption) {
return
NULL
;
return
NULL
;
}
}
SDiskCfg
dCfg
;
strcpy
(
dCfg
.
dir
,
pDnode
->
opt
.
dataDir
);
dCfg
.
level
=
0
;
dCfg
.
primary
=
1
;
if
(
tfsInit
(
&
dCfg
,
1
)
!=
0
)
{
dError
(
"failed to init tfs env"
);
dndCleanup
(
pDnode
);
return
NULL
;
}
if
(
vnodeInit
(
pDnode
->
opt
.
numOfCommitThreads
)
!=
0
)
{
if
(
vnodeInit
(
pDnode
->
opt
.
numOfCommitThreads
)
!=
0
)
{
dError
(
"failed to init vnode env"
);
dError
(
"failed to init vnode env"
);
dndCleanup
(
pDnode
);
dndCleanup
(
pDnode
);
...
@@ -259,6 +270,7 @@ void dndCleanup(SDnode *pDnode) {
...
@@ -259,6 +270,7 @@ void dndCleanup(SDnode *pDnode) {
dndCleanupVnodes
(
pDnode
);
dndCleanupVnodes
(
pDnode
);
dndCleanupDnode
(
pDnode
);
dndCleanupDnode
(
pDnode
);
vnodeClear
();
vnodeClear
();
tfsDestroy
();
walCleanUp
();
walCleanUp
();
rpcCleanup
();
rpcCleanup
();
...
...
source/dnode/vnode/impl/src/vnodeMgr.c
浏览文件 @
6835b689
...
@@ -24,13 +24,6 @@ int vnodeInit(uint16_t nthreads) {
...
@@ -24,13 +24,6 @@ int vnodeInit(uint16_t nthreads) {
return
0
;
return
0
;
}
}
SDiskCfg
dCfg
;
strcpy
(
dCfg
.
dir
,
tsDataDir
);
dCfg
.
level
=
0
;
dCfg
.
primary
=
1
;
tfsInit
(
&
dCfg
,
1
);
// Start commit handers
// Start commit handers
if
(
nthreads
>
0
)
{
if
(
nthreads
>
0
)
{
vnodeMgr
.
nthreads
=
nthreads
;
vnodeMgr
.
nthreads
=
nthreads
;
...
@@ -79,7 +72,6 @@ void vnodeClear() {
...
@@ -79,7 +72,6 @@ void vnodeClear() {
tfree
(
vnodeMgr
.
threads
);
tfree
(
vnodeMgr
.
threads
);
pthread_cond_destroy
(
&
(
vnodeMgr
.
hasTask
));
pthread_cond_destroy
(
&
(
vnodeMgr
.
hasTask
));
pthread_mutex_destroy
(
&
(
vnodeMgr
.
mutex
));
pthread_mutex_destroy
(
&
(
vnodeMgr
.
mutex
));
tfsDestroy
();
}
}
int
vnodeScheduleTask
(
SVnodeTask
*
pTask
)
{
int
vnodeScheduleTask
(
SVnodeTask
*
pTask
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录