Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
41c90280
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
提交
41c90280
编写于
3月 13, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
shm
上级
20b69c5e
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
52 addition
and
69 deletion
+52
-69
source/dnode/mgmt/bnode/inc/bmInt.h
source/dnode/mgmt/bnode/inc/bmInt.h
+2
-0
source/dnode/mgmt/bnode/src/dndBnode.c
source/dnode/mgmt/bnode/src/dndBnode.c
+4
-4
source/dnode/mgmt/dnode/src/dndMain.c
source/dnode/mgmt/dnode/src/dndMain.c
+21
-49
source/dnode/mgmt/mnode/inc/mmInt.h
source/dnode/mgmt/mnode/inc/mmInt.h
+2
-0
source/dnode/mgmt/mnode/src/mmFile.c
source/dnode/mgmt/mnode/src/mmFile.c
+1
-1
source/dnode/mgmt/mnode/src/mmHandle.c
source/dnode/mgmt/mnode/src/mmHandle.c
+1
-1
source/dnode/mgmt/mnode/src/mmMgmt.c
source/dnode/mgmt/mnode/src/mmMgmt.c
+1
-1
source/dnode/mgmt/mnode/src/mmWorker.c
source/dnode/mgmt/mnode/src/mmWorker.c
+1
-1
source/dnode/mgmt/qnode/inc/qmInt.h
source/dnode/mgmt/qnode/inc/qmInt.h
+2
-0
source/dnode/mgmt/qnode/src/dndQnode.c
source/dnode/mgmt/qnode/src/dndQnode.c
+4
-4
source/dnode/mgmt/snode/inc/smInt.h
source/dnode/mgmt/snode/inc/smInt.h
+2
-0
source/dnode/mgmt/snode/src/dndSnode.c
source/dnode/mgmt/snode/src/dndSnode.c
+4
-4
source/dnode/mgmt/vnode/inc/vmInt.h
source/dnode/mgmt/vnode/inc/vmInt.h
+3
-0
source/dnode/mgmt/vnode/src/dndVnodes.c
source/dnode/mgmt/vnode/src/dndVnodes.c
+4
-4
未找到文件。
source/dnode/mgmt/bnode/inc/
dndBnode
.h
→
source/dnode/mgmt/bnode/inc/
bmInt
.h
浏览文件 @
41c90280
...
...
@@ -21,6 +21,8 @@ extern "C" {
#endif
#include "dndInt.h"
SMgmtFp
bmGetMgmtFp
();
int32_t
dndInitBnode
(
SDnode
*
pDnode
);
void
dndCleanupBnode
(
SDnode
*
pDnode
);
...
...
source/dnode/mgmt/bnode/src/dndBnode.c
浏览文件 @
41c90280
...
...
@@ -14,10 +14,10 @@
*/
#define _DEFAULT_SOURCE
#include "dndBnode.h"
#include "dndMgmt.h"
#include "dndTransport.h"
#include "dndWorker.h"
//
#include "dndBnode.h"
//
#include "dndMgmt.h"
//
#include "dndTransport.h"
//
#include "dndWorker.h"
#if 0
static void dndProcessBnodeQueue(SDnode *pDnode, STaosQall *qall, int32_t numOfMsgs);
...
...
source/dnode/mgmt/dnode/src/dndMain.c
浏览文件 @
41c90280
...
...
@@ -15,44 +15,16 @@
#define _DEFAULT_SOURCE
#include "dndMain.h"
// #include "dndBnode.h"
#include "dndMgmt.h"
// #include "mm.h"
// #include "dndQnode.h"
// #include "dndSnode.h"
#include "dndTransport.h"
// #include "dndVnodes.h"
// #include "monitor.h"
// #include "sync.h"
// #include "tfs.h"
// #include "wal.h"
static
int8_t
once
=
DND_ENV_INIT
;
SMgmtFp
mmGetNodeFp
()
{
SMgmtFp
nullFp
=
{
0
};
return
nullFp
;
}
SMgmtFp
vndGetNodeFp
()
{
SMgmtFp
nullFp
=
{
0
};
return
nullFp
;
}
SMgmtFp
qndGetNodeFp
()
{
SMgmtFp
nullFp
=
{
0
};
return
nullFp
;
}
SMgmtFp
sndGetNodeFp
()
{
SMgmtFp
nullFp
=
{
0
};
return
nullFp
;
}
#include "bmInt.h"
#include "mmInt.h"
#include "qmInt.h"
#include "smInt.h"
#include "vmInt.h"
SMgmtFp
bndGetNodeFp
()
{
SMgmtFp
nullFp
=
{
0
};
return
nullFp
;
}
static
int8_t
once
=
DND_ENV_INIT
;
static
void
dndResetLog
(
SMgmtWrapper
*
pMgmt
)
{
char
logname
[
24
]
=
{
0
};
...
...
@@ -63,7 +35,7 @@ static void dndResetLog(SMgmtWrapper *pMgmt) {
taosInitLog
(
logname
,
1
);
}
static
bool
dndRequire
Open
Node
(
SMgmtWrapper
*
pMgmt
)
{
static
bool
dndRequireNode
(
SMgmtWrapper
*
pMgmt
)
{
bool
required
=
(
*
pMgmt
->
fp
.
requiredFp
)(
pMgmt
);
if
(
!
required
)
{
dDebug
(
"node:%s, no need to start on this dnode"
,
pMgmt
->
name
);
...
...
@@ -73,7 +45,7 @@ static bool dndRequireOpenNode(SMgmtWrapper *pMgmt) {
return
required
;
}
static
void
dndClear
DnodeMem
(
SDnode
*
pDnode
)
{
static
void
dndClear
Memory
(
SDnode
*
pDnode
)
{
for
(
ENodeType
n
=
0
;
n
<
NODE_MAX
;
++
n
)
{
SMgmtWrapper
*
pMgmt
=
&
pDnode
->
mgmts
[
n
];
tfree
(
pMgmt
->
path
);
...
...
@@ -86,7 +58,7 @@ static void dndClearDnodeMem(SDnode *pDnode) {
dDebug
(
"dnode object memory is cleared, data:%p"
,
pDnode
);
}
static
int32_t
dndInit
Dnode
Resource
(
SDnode
*
pDnode
)
{
static
int32_t
dndInitResource
(
SDnode
*
pDnode
)
{
SDiskCfg
dCfg
=
{
0
};
tstrncpy
(
dCfg
.
dir
,
pDnode
->
cfg
.
dataDir
,
TSDB_FILENAME_LEN
);
dCfg
.
level
=
0
;
...
...
@@ -120,7 +92,7 @@ static int32_t dndInitDnodeResource(SDnode *pDnode) {
return
0
;
}
static
void
dndClear
Dnode
Resource
(
SDnode
*
pDnode
)
{
static
void
dndClearResource
(
SDnode
*
pDnode
)
{
dndCleanupTrans
(
pDnode
);
dndStopMgmt
(
pDnode
);
dndCleanupMgmt
(
pDnode
);
...
...
@@ -150,11 +122,11 @@ SDnode *dndCreate(SDndCfg *pCfg) {
goto
_OVER
;
}
pDnode
->
mgmts
[
MNODE
].
fp
=
mmGet
Node
Fp
();
pDnode
->
mgmts
[
VNODES
].
fp
=
v
ndGetNode
Fp
();
pDnode
->
mgmts
[
QNODE
].
fp
=
q
ndGetNode
Fp
();
pDnode
->
mgmts
[
SNODE
].
fp
=
s
ndGetNode
Fp
();
pDnode
->
mgmts
[
BNODE
].
fp
=
b
ndGetNode
Fp
();
pDnode
->
mgmts
[
MNODE
].
fp
=
mmGet
Mgmt
Fp
();
pDnode
->
mgmts
[
VNODES
].
fp
=
v
mGetMgmt
Fp
();
pDnode
->
mgmts
[
QNODE
].
fp
=
q
mGetMgmt
Fp
();
pDnode
->
mgmts
[
SNODE
].
fp
=
s
mGetMgmt
Fp
();
pDnode
->
mgmts
[
BNODE
].
fp
=
b
mGetMgmt
Fp
();
pDnode
->
mgmts
[
MNODE
].
name
=
"mnode"
;
pDnode
->
mgmts
[
VNODES
].
name
=
"vnodes"
;
pDnode
->
mgmts
[
QNODE
].
name
=
"qnode"
;
...
...
@@ -172,7 +144,7 @@ SDnode *dndCreate(SDndCfg *pCfg) {
}
pMgmt
->
procType
=
PROC_SINGLE
;
pMgmt
->
required
=
dndRequire
Open
Node
(
pMgmt
);
pMgmt
->
required
=
dndRequireNode
(
pMgmt
);
if
(
pMgmt
->
required
)
{
if
(
taosMkDir
(
pMgmt
->
path
)
!=
0
)
{
terrno
=
TAOS_SYSTEM_ERROR
(
errno
);
...
...
@@ -189,7 +161,7 @@ SDnode *dndCreate(SDndCfg *pCfg) {
_OVER:
if
(
code
!=
0
&&
pDnode
)
{
dndClear
DnodeMem
(
pDnode
);
dndClear
Memory
(
pDnode
);
tfree
(
pDnode
);
dError
(
"failed to create dnode object since %s"
,
terrstr
());
}
else
{
...
...
@@ -259,8 +231,8 @@ void dndClose(SDnode *pDnode) {
dInfo
(
"start to close dnode, data:%p"
,
pDnode
);
dndSetStatus
(
pDnode
,
DND_STAT_STOPPED
);
dndClear
Dnode
Resource
(
pDnode
);
dndClear
DnodeMem
(
pDnode
);
dndClearResource
(
pDnode
);
dndClear
Memory
(
pDnode
);
tfree
(
pDnode
);
dInfo
(
"dnode object is closed, data:%p"
,
pDnode
);
}
...
...
@@ -288,9 +260,9 @@ int32_t dndInit() {
return
-
1
;
}
// SVnodeOpt vnodeOpt = {
// .nthreads = tsNumOfCommitThreads, .putReqToVQueryQFp = dndPutReqToVQueryQ, .sendReqToDnodeFp = dndSendReqToDnode};
// .nthreads = tsNumOfCommitThreads, .putReqToVQueryQFp = dndPutReqToVQueryQ, .sendReqToDnodeFp =
// dndSendReqToDnode};
// if (vnodeInit(&vnodeOpt) != 0) {
// dError("failed to init vnode since %s", terrstr());
...
...
source/dnode/mgmt/mnode/inc/mm.h
→
source/dnode/mgmt/mnode/inc/mm
Int
.h
浏览文件 @
41c90280
...
...
@@ -21,6 +21,8 @@ extern "C" {
#endif
#include "dndInt.h"
SMgmtFp
mmGetMgmtFp
();
// interface
int32_t
mmInit
(
SDnode
*
pDnode
);
void
mmCleanup
(
SDnode
*
pDnode
);
...
...
source/dnode/mgmt/mnode/src/mmFile.c
浏览文件 @
41c90280
...
...
@@ -14,7 +14,7 @@
*/
#define _DEFAULT_SOURCE
#include "mm.h"
#include "mm
Int
.h"
#if 0
int32_t mmReadFile(SDnode *pDnode) {
...
...
source/dnode/mgmt/mnode/src/mmHandle.c
浏览文件 @
41c90280
...
...
@@ -14,7 +14,7 @@
*/
#define _DEFAULT_SOURCE
#include "mm.h"
#include "mm
Int
.h"
#if 0
#include "dndMgmt.h"
...
...
source/dnode/mgmt/mnode/src/mmMgmt.c
浏览文件 @
41c90280
...
...
@@ -14,7 +14,7 @@
*/
#define _DEFAULT_SOURCE
#include "mm.h"
#include "mm
Int
.h"
#include "dndMgmt.h"
#include "dndTransport.h"
...
...
source/dnode/mgmt/mnode/src/mmWorker.c
浏览文件 @
41c90280
...
...
@@ -14,7 +14,7 @@
*/
#define _DEFAULT_SOURCE
#include "mm.h"
#include "mm
Int
.h"
#include "dndMgmt.h"
#include "dndTransport.h"
...
...
source/dnode/mgmt/qnode/inc/
dndQnode
.h
→
source/dnode/mgmt/qnode/inc/
qmInt
.h
浏览文件 @
41c90280
...
...
@@ -21,6 +21,8 @@ extern "C" {
#endif
#include "dndInt.h"
SMgmtFp
qmGetMgmtFp
();
int32_t
dndInitQnode
(
SDnode
*
pDnode
);
void
dndCleanupQnode
(
SDnode
*
pDnode
);
...
...
source/dnode/mgmt/qnode/src/dndQnode.c
浏览文件 @
41c90280
...
...
@@ -14,10 +14,10 @@
*/
#define _DEFAULT_SOURCE
#include "dndQnode.h"
#include "dndMgmt.h"
#include "dndTransport.h"
#include "dndWorker.h"
//
#include "dndQnode.h"
//
#include "dndMgmt.h"
//
#include "dndTransport.h"
//
#include "dndWorker.h"
#if 0
static void dndProcessQnodeQueue(SDnode *pDnode, SRpcMsg *pMsg);
...
...
source/dnode/mgmt/snode/inc/
dndSnode
.h
→
source/dnode/mgmt/snode/inc/
smInt
.h
浏览文件 @
41c90280
...
...
@@ -21,6 +21,8 @@ extern "C" {
#endif
#include "dndInt.h"
SMgmtFp
smGetMgmtFp
();
int32_t
dndInitSnode
(
SDnode
*
pDnode
);
void
dndCleanupSnode
(
SDnode
*
pDnode
);
...
...
source/dnode/mgmt/snode/src/dndSnode.c
浏览文件 @
41c90280
...
...
@@ -14,10 +14,10 @@
*/
#define _DEFAULT_SOURCE
#include "dndSnode.h"
#include "dndMgmt.h"
#include "dndTransport.h"
#include "dndWorker.h"
//
#include "dndSnode.h"
//
#include "dndMgmt.h"
//
#include "dndTransport.h"
//
#include "dndWorker.h"
#if 0
static void dndProcessSnodeQueue(SDnode *pDnode, SRpcMsg *pMsg);
...
...
source/dnode/mgmt/vnode/inc/
dndVnodes
.h
→
source/dnode/mgmt/vnode/inc/
vmInt
.h
浏览文件 @
41c90280
...
...
@@ -21,6 +21,9 @@ extern "C" {
#endif
#include "dndInt.h"
SMgmtFp
vmGetMgmtFp
()
;
int32_t
dndInitVnodes
(
SDnode
*
pDnode
);
void
dndCleanupVnodes
(
SDnode
*
pDnode
);
void
dndGetVnodeLoads
(
SDnode
*
pDnode
,
SArray
*
pLoads
);
...
...
source/dnode/mgmt/vnode/src/dndVnodes.c
浏览文件 @
41c90280
...
...
@@ -14,10 +14,10 @@
*/
#define _DEFAULT_SOURCE
#include "dndVnodes.h"
#include "dndMgmt.h"
#include "dndTransport.h"
#include "sync.h"
//
#include "dndVnodes.h"
//
#include "dndMgmt.h"
//
#include "dndTransport.h"
//
#include "sync.h"
#if 0
typedef struct {
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录