Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
0b6d32a3
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1187
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看板
提交
0b6d32a3
编写于
1月 11, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rename file
上级
aac15d18
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
28 addition
and
27 deletion
+28
-27
include/dnode/vnode/vnode.h
include/dnode/vnode/vnode.h
+2
-2
include/libs/tfs/tfs.h
include/libs/tfs/tfs.h
+1
-1
source/dnode/mgmt/impl/src/dndEnv.c
source/dnode/mgmt/impl/src/dndEnv.c
+17
-16
source/dnode/vnode/impl/src/vnodeMgr.c
source/dnode/vnode/impl/src/vnodeMgr.c
+1
-1
source/dnode/vnode/impl/test/vnodeApiTests.cpp
source/dnode/vnode/impl/test/vnodeApiTests.cpp
+2
-2
source/libs/tfs/src/tfs.c
source/libs/tfs/src/tfs.c
+4
-4
src/inc/tfs.h
src/inc/tfs.h
+1
-1
未找到文件。
include/dnode/vnode/vnode.h
浏览文件 @
0b6d32a3
...
...
@@ -89,10 +89,10 @@ typedef struct {
int
vnodeInit
(
const
SVnodeOpt
*
pOption
);
/**
* @brief
clear a vnod
e
* @brief
Cleanup the vnode modul
e
*
*/
void
vnodeClea
r
();
void
vnodeClea
nup
();
/**
* @brief Open a VNODE.
...
...
include/libs/tfs/tfs.h
浏览文件 @
0b6d32a3
...
...
@@ -49,7 +49,7 @@ typedef struct {
}
STierMeta
;
int
tfsInit
(
SDiskCfg
*
pDiskCfg
,
int
ndisk
);
void
tfs
Destroy
();
void
tfs
Cleanup
();
void
tfsUpdateInfo
(
SFSMeta
*
pFSMeta
,
STierMeta
*
tierMetas
,
int8_t
numLevels
);
void
tfsGetMeta
(
SFSMeta
*
pMeta
);
void
tfsAllocDisk
(
int
expLevel
,
int
*
level
,
int
*
id
);
...
...
source/dnode/mgmt/impl/src/dndEnv.c
浏览文件 @
0b6d32a3
...
...
@@ -173,18 +173,6 @@ SDnode *dndCreate(SDnodeObjCfg *pCfg) {
return
NULL
;
}
if
(
rpcInit
()
!=
0
)
{
dError
(
"failed to init rpc since %s"
,
terrstr
());
dndClose
(
pDnode
);
return
NULL
;
}
if
(
walInit
()
!=
0
)
{
dError
(
"failed to init wal since %s"
,
terrstr
());
dndClose
(
pDnode
);
return
NULL
;
}
SDiskCfg
dCfg
;
strcpy
(
dCfg
.
dir
,
pDnode
->
cfg
.
dataDir
);
dCfg
.
level
=
0
;
...
...
@@ -277,10 +265,8 @@ void dndClose(SDnode *pDnode) {
dndCleanupQnode
(
pDnode
);
dndCleanupVnodes
(
pDnode
);
dndCleanupMgmt
(
pDnode
);
vnodeClear
();
tfsDestroy
();
walCleanUp
();
rpcCleanup
();
vnodeCleanup
();
tfsCleanup
();
dndCloseImp
(
pDnode
);
free
(
pDnode
);
...
...
@@ -298,6 +284,18 @@ int32_t dndInit(const SDnodeEnvCfg *pCfg) {
taosBlockSIGPIPE
();
taosResolveCRC
();
if
(
rpcInit
()
!=
0
)
{
dError
(
"failed to init rpc since %s"
,
terrstr
());
dndCleanup
();
return
-
1
;
}
if
(
walInit
()
!=
0
)
{
dError
(
"failed to init wal since %s"
,
terrstr
());
dndCleanup
();
return
-
1
;
}
memcpy
(
&
dndEnv
.
cfg
,
pCfg
,
sizeof
(
SDnodeEnvCfg
));
dInfo
(
"dnode env is initialized"
);
return
0
;
...
...
@@ -309,6 +307,9 @@ void dndCleanup() {
return
;
}
walCleanUp
();
rpcCleanup
();
taosStopCacheRefreshWorker
();
dInfo
(
"dnode env is cleaned up"
);
}
\ No newline at end of file
source/dnode/vnode/impl/src/vnodeMgr.c
浏览文件 @
0b6d32a3
...
...
@@ -56,7 +56,7 @@ int vnodeInit(const SVnodeOpt *pOption) {
return
0
;
}
void
vnodeClea
r
()
{
void
vnodeClea
nup
()
{
if
(
TD_CHECK_AND_SET_MOD_CLEAR
(
&
(
vnodeMgr
.
vnodeInitFlag
))
==
TD_MOD_UNINITIALIZED
)
{
return
;
}
...
...
source/dnode/vnode/impl/test/vnodeApiTests.cpp
浏览文件 @
0b6d32a3
...
...
@@ -227,7 +227,7 @@ TEST(vnodeApiTest, vnode_simple_create_table_test) {
// CLOSE THE VNODE
vnodeClose
(
pVnode
);
vnodeClea
r
();
vnodeClea
nup
();
taosArrayDestroy
(
pMsgArr
);
}
...
...
@@ -279,7 +279,7 @@ TEST(vnodeApiTest, vnode_simple_insert_test) {
// Close the vnode
vnodeClose
(
pVnode
);
vnodeClea
r
();
vnodeClea
nup
();
taosArrayDestroy
(
pMsgArr
);
}
\ No newline at end of file
source/libs/tfs/src/tfs.c
浏览文件 @
0b6d32a3
...
...
@@ -85,19 +85,19 @@ int tfsInit(SDiskCfg *pDiskCfg, int ndisk) {
taosGetDefaultHashFunction
(
TSDB_DATA_TYPE_BINARY
),
false
,
HASH_NO_LOCK
);
if
(
pfs
->
map
==
NULL
)
{
terrno
=
TSDB_CODE_FS_OUT_OF_MEMORY
;
tfs
Destroy
();
tfs
Cleanup
();
return
-
1
;
}
for
(
int
idisk
=
0
;
idisk
<
ndisk
;
idisk
++
)
{
if
(
tfsMount
(
pDiskCfg
+
idisk
)
<
0
)
{
tfs
Destroy
();
tfs
Cleanup
();
return
-
1
;
}
}
if
(
tfsCheck
()
<
0
)
{
tfs
Destroy
();
tfs
Cleanup
();
return
-
1
;
}
...
...
@@ -109,7 +109,7 @@ int tfsInit(SDiskCfg *pDiskCfg, int ndisk) {
return
0
;
}
void
tfs
Destroy
()
{
void
tfs
Cleanup
()
{
taosHashCleanup
(
pfs
->
map
);
pfs
->
map
=
NULL
;
...
...
src/inc/tfs.h
浏览文件 @
0b6d32a3
...
...
@@ -49,7 +49,7 @@ typedef struct {
}
STierMeta
;
int
tfsInit
(
SDiskCfg
*
pDiskCfg
,
int
ndisk
);
void
tfs
Destroy
();
void
tfs
Cleanup
();
void
tfsUpdateInfo
(
SFSMeta
*
pFSMeta
,
STierMeta
*
tierMetas
,
int8_t
numLevels
);
void
tfsGetMeta
(
SFSMeta
*
pMeta
);
void
tfsAllocDisk
(
int
expLevel
,
int
*
level
,
int
*
id
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录