Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
7354b9e1
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看板
提交
7354b9e1
编写于
11月 01, 2021
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
minor changes
上级
89a19fdb
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
71 addition
and
45 deletion
+71
-45
source/dnode/mgmt/inc/dnodeInt.h
source/dnode/mgmt/inc/dnodeInt.h
+0
-1
source/dnode/mgmt/inc/dnodeMnode.h
source/dnode/mgmt/inc/dnodeMnode.h
+3
-0
source/dnode/mgmt/inc/dnodeVnodes.h
source/dnode/mgmt/inc/dnodeVnodes.h
+2
-6
source/dnode/mgmt/src/dnodeInt.c
source/dnode/mgmt/src/dnodeInt.c
+8
-34
source/dnode/mgmt/src/dnodeMain.c
source/dnode/mgmt/src/dnodeMain.c
+2
-4
source/dnode/mgmt/src/dnodeMnode.c
source/dnode/mgmt/src/dnodeMnode.c
+34
-0
source/dnode/mgmt/src/dnodeVnodes.c
source/dnode/mgmt/src/dnodeVnodes.c
+22
-0
未找到文件。
source/dnode/mgmt/inc/dnodeInt.h
浏览文件 @
7354b9e1
...
...
@@ -24,7 +24,6 @@ extern "C" {
#include "tglobal.h"
#include "tlog.h"
#include "trpc.h"
#include "ttimer.h"
extern
int32_t
dDebugFlag
;
...
...
source/dnode/mgmt/inc/dnodeMnode.h
浏览文件 @
7354b9e1
...
...
@@ -21,6 +21,9 @@ extern "C" {
#endif
#include "dnodeInt.h"
int32_t
dnodeInitMnode
();
void
dnodeCleanupMnode
();
void
dnodeProcessCreateMnodeReq
(
SRpcMsg
*
pMsg
);
#ifdef __cplusplus
...
...
source/dnode/mgmt/inc/dnodeVnodes.h
浏览文件 @
7354b9e1
...
...
@@ -21,12 +21,8 @@ extern "C" {
#endif
#include "dnodeInt.h"
int32_t
dnodeInitDnode
();
void
dnodeCleanupDnode
();
void
dnodeProcessStatusRsp
(
SRpcMsg
*
pMsg
);
void
dnodeProcessStartupReq
(
SRpcMsg
*
pMsg
);
void
dnodeProcessCreateMnodeReq
(
SRpcMsg
*
pMsg
);
void
dnodeProcessConfigDnodeReq
(
SRpcMsg
*
pMsg
);
int32_t
dnodeInitVnodes
();
void
dnodeCleanupVnodes
();
#ifdef __cplusplus
}
...
...
source/dnode/mgmt/src/dnodeInt.c
浏览文件 @
7354b9e1
...
...
@@ -17,14 +17,14 @@
#include "dnodeCheck.h"
#include "dnodeConfig.h"
#include "dnodeDnode.h"
#include "dnodeMnode.h"
#include "dnodeTransport.h"
#include "
mnode
.h"
#include "
dnodeVnodes
.h"
#include "sync.h"
#include "tcache.h"
#include "tconfig.h"
#include "tnote.h"
#include "tstep.h"
#include "vnode.h"
#include "wal.h"
static
struct
{
...
...
@@ -37,7 +37,7 @@ EDnStat dnodeGetRunStat() { return tsInt.runStatus; }
void
dnodeSetRunStat
(
EDnStat
stat
)
{
tsInt
.
runStatus
=
stat
;
}
void
dnodeReportStartup
(
char
*
name
,
char
*
desc
)
{
static
void
dnodeReportStartup
(
char
*
name
,
char
*
desc
)
{
SStartupStep
*
startup
=
&
tsInt
.
startup
;
tstrncpy
(
startup
->
name
,
name
,
strlen
(
startup
->
name
));
tstrncpy
(
startup
->
desc
,
desc
,
strlen
(
startup
->
desc
));
...
...
@@ -53,24 +53,6 @@ static void dnodeReportStartupFinished(char *name, char *desc) {
void
dnodeGetStartup
(
SStartupStep
*
pStep
)
{
memcpy
(
pStep
,
&
tsInt
.
startup
,
sizeof
(
SStartupStep
));
}
static
int32_t
dnodeInitVnode
()
{
return
vnodeInit
();
}
static
int32_t
dnodeInitMnode
()
{
SMnodePara
para
;
para
.
fp
.
GetDnodeEp
=
dnodeGetEp
;
para
.
fp
.
SendMsgToDnode
=
dnodeSendMsgToDnode
;
para
.
fp
.
SendMsgToMnode
=
dnodeSendMsgToMnode
;
para
.
fp
.
SendRedirectMsg
=
dnodeSendRedirectMsg
;
para
.
dnodeId
=
dnodeGetDnodeId
();
para
.
clusterId
=
dnodeGetClusterId
();
return
mnodeInit
(
para
);
}
static
int32_t
dnodeInitTfs
()
{}
static
int32_t
dnodeInitMain
()
{
tsInt
.
runStatus
=
DN_RUN_STAT_STOPPED
;
tscEmbedded
=
1
;
...
...
@@ -168,14 +150,14 @@ int32_t dnodeInit() {
taosStepAdd
(
steps
,
"dnode-dir"
,
dnodeInitDir
,
dnodeCleanupDir
);
taosStepAdd
(
steps
,
"dnode-check"
,
dnodeInitCheck
,
dnodeCleanupCheck
);
taosStepAdd
(
steps
,
"dnode-rpc"
,
rpcInit
,
rpcCleanup
);
taosStepAdd
(
steps
,
"dnode-tfs"
,
dnodeInitTfs
,
NULL
);
taosStepAdd
(
steps
,
"dnode-tfs"
,
NULL
,
NULL
);
taosStepAdd
(
steps
,
"dnode-wal"
,
walInit
,
walCleanUp
);
taosStepAdd
(
steps
,
"dnode-sync"
,
syncInit
,
syncCleanUp
);
taosStepAdd
(
steps
,
"dnode-
eps
"
,
dnodeInitConfig
,
dnodeCleanupConfig
);
taosStepAdd
(
steps
,
"dnode-vnode
"
,
dnodeInitVnode
,
vnodeCleanup
);
taosStepAdd
(
steps
,
"dnode-mnode"
,
dnodeInitMnode
,
mnodeCleanup
);
taosStepAdd
(
steps
,
"dnode-
config
"
,
dnodeInitConfig
,
dnodeCleanupConfig
);
taosStepAdd
(
steps
,
"dnode-vnode
s"
,
dnodeInitVnodes
,
dnodeCleanupVnodes
);
taosStepAdd
(
steps
,
"dnode-mnode"
,
dnodeInitMnode
,
dnodeCleanupMnode
);
taosStepAdd
(
steps
,
"dnode-trans"
,
dnodeInitTrans
,
dnodeCleanupTrans
);
taosStepAdd
(
steps
,
"dnode-
msg
"
,
dnodeInitDnode
,
dnodeCleanupDnode
);
taosStepAdd
(
steps
,
"dnode-
dnode
"
,
dnodeInitDnode
,
dnodeCleanupDnode
);
tsInt
.
steps
=
steps
;
taosStepExec
(
tsInt
.
steps
);
...
...
@@ -194,11 +176,3 @@ void dnodeCleanup() {
tsInt
.
steps
=
NULL
;
}
}
// tsVnode.msgFp[TSDB_MSG_TYPE_MD_CREATE_VNODE] = vnodeProcessMgmtMsg;
// tsVnode.msgFp[TSDB_MSG_TYPE_MD_ALTER_VNODE] = vnodeProcessMgmtMsg;
// tsVnode.msgFp[TSDB_MSG_TYPE_MD_SYNC_VNODE] = vnodeProcessMgmtMsg;
// tsVnode.msgFp[TSDB_MSG_TYPE_MD_COMPACT_VNODE] = vnodeProcessMgmtMsg;
// tsVnode.msgFp[TSDB_MSG_TYPE_MD_DROP_VNODE] = vnodeProcessMgmtMsg;
// tsVnode.msgFp[TSDB_MSG_TYPE_MD_ALTER_STREAM] = vnodeProcessMgmtMsg;
\ No newline at end of file
source/dnode/mgmt/src/dnodeMain.c
浏览文件 @
7354b9e1
...
...
@@ -12,8 +12,8 @@
* 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 "os.h"
#
include "ulog.h"
#
define _DEFAULT_SOURCE
#include "dnodeInt.h"
static
bool
stop
=
false
;
...
...
@@ -35,8 +35,6 @@ int main(int argc, char const *argv[]) {
exit
(
EXIT_FAILURE
);
}
dInfo
(
"Started TDengine service successfully."
);
while
(
!
stop
)
{
taosMsleep
(
100
);
}
...
...
source/dnode/mgmt/src/dnodeMnode.c
0 → 100644
浏览文件 @
7354b9e1
/*
* 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/>.
*/
#define _DEFAULT_SOURCE
#include "dnodeMnode.h"
#include "dnodeConfig.h"
#include "dnodeTransport.h"
#include "mnode.h"
int32_t
dnodeInitMnode
()
{
SMnodePara
para
;
para
.
fp
.
GetDnodeEp
=
dnodeGetEp
;
para
.
fp
.
SendMsgToDnode
=
dnodeSendMsgToDnode
;
para
.
fp
.
SendMsgToMnode
=
dnodeSendMsgToMnode
;
para
.
fp
.
SendRedirectMsg
=
dnodeSendRedirectMsg
;
para
.
dnodeId
=
dnodeGetDnodeId
();
para
.
clusterId
=
dnodeGetClusterId
();
return
mnodeInit
(
para
);
}
void
dnodeCleanupMnode
()
{
mnodeCleanup
();
}
\ No newline at end of file
source/dnode/mgmt/src/dnodeVnodes.c
浏览文件 @
7354b9e1
/*
* 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/>.
*/
#define _DEFAULT_SOURCE
#include "dnodeDnode.h"
#include "vnode.h"
int32_t
dnodeInitVnodes
()
{
return
vnodeInit
();
}
void
dnodeCleanupVnodes
()
{
vnodeCleanup
();
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录