Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
63861e65
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看板
提交
63861e65
编写于
3月 16, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
shm
上级
2f7cdcd9
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
42 addition
and
108 deletion
+42
-108
source/dnode/mgmt/bnode/inc/bmMsg.h
source/dnode/mgmt/bnode/inc/bmMsg.h
+1
-1
source/dnode/mgmt/container/inc/dndInt.h
source/dnode/mgmt/container/inc/dndInt.h
+3
-3
source/dnode/mgmt/container/src/dndMonitor.c
source/dnode/mgmt/container/src/dndMonitor.c
+1
-1
source/dnode/mgmt/container/src/dndNode.c
source/dnode/mgmt/container/src/dndNode.c
+1
-1
source/dnode/mgmt/container/src/dndTransport.c
source/dnode/mgmt/container/src/dndTransport.c
+1
-1
source/dnode/mgmt/dnode/inc/dm.h
source/dnode/mgmt/dnode/inc/dm.h
+3
-2
source/dnode/mgmt/dnode/inc/dmInt.h
source/dnode/mgmt/dnode/inc/dmInt.h
+0
-2
source/dnode/mgmt/dnode/src/dmWorker.c
source/dnode/mgmt/dnode/src/dmWorker.c
+1
-4
source/dnode/mgmt/mnode/inc/mm.h
source/dnode/mgmt/mnode/inc/mm.h
+11
-7
source/dnode/mgmt/mnode/inc/mmFile.h
source/dnode/mgmt/mnode/inc/mmFile.h
+0
-32
source/dnode/mgmt/mnode/inc/mmInt.h
source/dnode/mgmt/mnode/inc/mmInt.h
+16
-10
source/dnode/mgmt/mnode/inc/mmWorker.h
source/dnode/mgmt/mnode/inc/mmWorker.h
+0
-38
source/dnode/mgmt/mnode/src/mmFile.c
source/dnode/mgmt/mnode/src/mmFile.c
+1
-1
source/dnode/mgmt/mnode/src/mmInt.c
source/dnode/mgmt/mnode/src/mmInt.c
+1
-3
source/dnode/mgmt/mnode/src/mmMsg.c
source/dnode/mgmt/mnode/src/mmMsg.c
+2
-2
未找到文件。
source/dnode/mgmt/bnode/inc/bmMsg.h
浏览文件 @
63861e65
...
...
@@ -16,7 +16,7 @@
#ifndef _TD_DND_BNODE_HANDLE_H_
#define _TD_DND_BNODE_HANDLE_H_
#include "mm
Int
.h"
#include "mm.h"
#ifdef __cplusplus
extern
"C"
{
...
...
source/dnode/mgmt/container/inc/dndInt.h
浏览文件 @
63861e65
...
...
@@ -22,7 +22,7 @@
extern
"C"
{
#endif
// dndInt.
h
// dndInt.
c
int32_t
dndInit
();
void
dndCleanup
();
const
char
*
dndStatStr
(
EDndStatus
stat
);
...
...
@@ -30,14 +30,14 @@ void dndGetStartup(SDnode *pDnode, SStartupReq *pStartup);
TdFilePtr
dndCheckRunning
(
char
*
dataDir
);
void
dndProcessStartupReq
(
SDnode
*
pDnode
,
SRpcMsg
*
pMsg
);
// dndNode.
h
// dndNode.
c
SDnode
*
dndCreate
(
const
SDnodeOpt
*
pOption
);
void
dndClose
(
SDnode
*
pDnode
);
int32_t
dndRun
(
SDnode
*
pDnode
);
void
dndHandleEvent
(
SDnode
*
pDnode
,
EDndEvent
event
);
void
dndProcessRpcMsg
(
SMgmtWrapper
*
pWrapper
,
SRpcMsg
*
pMsg
,
SEpSet
*
pEpSet
);
// dndTransport.
h
// dndTransport.
c
int32_t
dndInitServer
(
SDnode
*
pDnode
);
void
dndCleanupServer
(
SDnode
*
pDnode
);
int32_t
dndInitClient
(
SDnode
*
pDnode
);
...
...
source/dnode/mgmt/container/src/dndMonitor.c
浏览文件 @
63861e65
...
...
@@ -17,7 +17,7 @@
#include "dndInt.h"
#include "dmInt.h"
#include "mm
Int
.h"
#include "mm.h"
#include "vmInt.h"
static
int32_t
dndGetMonitorDiskInfo
(
SDnode
*
pDnode
,
SMonDiskInfo
*
pInfo
)
{
...
...
source/dnode/mgmt/container/src/dndNode.c
浏览文件 @
63861e65
...
...
@@ -18,7 +18,7 @@
#include "bmInt.h"
#include "dmInt.h"
#include "mm
Int
.h"
#include "mm.h"
#include "qmInt.h"
#include "smInt.h"
#include "vmInt.h"
...
...
source/dnode/mgmt/container/src/dndTransport.c
浏览文件 @
63861e65
...
...
@@ -17,7 +17,7 @@
#include "dndInt.h"
#include "dmInt.h"
#include "mm
Int
.h"
#include "mm.h"
#define INTERNAL_USER "_dnd"
#define INTERNAL_CKEY "_key"
...
...
source/dnode/mgmt/dnode/inc/dm.h
浏览文件 @
63861e65
...
...
@@ -22,11 +22,12 @@
extern
"C"
{
#endif
void
dmGetMgmtFp
(
SMgmtWrapper
*
pWrapper
);
void
dmGetMgmtFp
(
SMgmtWrapper
*
pWrapper
);
void
dmInitMsgHandles
(
SMgmtWrapper
*
pWrapper
);
void
dmGetMnodeEpSet
(
SMgmtWrapper
*
pWrapper
,
SEpSet
*
pEpSet
);
void
dmUpdateMnodeEpSet
(
SMgmtWrapper
*
pWrapper
,
SEpSet
*
pEpSet
);
void
dmSendRedirectRsp
(
SMgmtWrapper
*
pWrapper
,
SRpcMsg
*
pMsg
);
void
dmInitMsgHandles
(
SMgmtWrapper
*
pWrapper
);
int32_t
dmStart
(
SMgmtWrapper
*
pWrapper
);
#ifdef __cplusplus
...
...
source/dnode/mgmt/dnode/inc/dmInt.h
浏览文件 @
63861e65
...
...
@@ -43,8 +43,6 @@ int32_t dmReadFile(SDnodeMgmt *pMgmt);
int32_t
dmWriteFile
(
SDnodeMgmt
*
pMgmt
);
void
dmUpdateDnodeEps
(
SDnodeMgmt
*
pMgmt
,
SArray
*
pDnodeEps
);
// dmInt.c
// dmMsg.c
void
dmSendStatusReq
(
SDnodeMgmt
*
pMgmt
);
int32_t
dmProcessConfigReq
(
SDnodeMgmt
*
pMgmt
,
SNodeMsg
*
pMsg
);
...
...
source/dnode/mgmt/dnode/src/dmWorker.c
浏览文件 @
63861e65
...
...
@@ -17,7 +17,7 @@
#include "dmInt.h"
#include "bmInt.h"
#include "mm
Int
.h"
#include "mm.h"
#include "qmInt.h"
#include "smInt.h"
#include "vmInt.h"
...
...
@@ -62,9 +62,6 @@ static void dmProcessQueue(SDnode *pDnode, SNodeMsg *pMsg) {
case
TDMT_DND_CREATE_MNODE
:
code
=
mmProcessCreateReq
(
dndGetWrapper
(
pDnode
,
MNODE
)
->
pMgmt
,
pMsg
);
break
;
case
TDMT_DND_ALTER_MNODE
:
code
=
mmProcessAlterReq
(
dndGetWrapper
(
pDnode
,
MNODE
)
->
pMgmt
,
pMsg
);
break
;
case
TDMT_DND_DROP_MNODE
:
code
=
mmProcessDropReq
(
dndGetWrapper
(
pDnode
,
MNODE
)
->
pMgmt
,
pMsg
);
break
;
...
...
source/dnode/mgmt/mnode/inc/mm
Msg
.h
→
source/dnode/mgmt/mnode/inc/mm.h
浏览文件 @
63861e65
...
...
@@ -13,23 +13,27 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _TD_DND_MNODE_
MSG_
H_
#define _TD_DND_MNODE_
MSG_
H_
#ifndef _TD_DND_MNODE_H_
#define _TD_DND_MNODE_H_
#include "
mmInt
.h"
#include "
dnd
.h"
#ifdef __cplusplus
extern
"C"
{
#endif
void
mmGetMgmtFp
(
SMgmtWrapper
*
pMgmt
);
void
mmInitMsgHandles
(
SMgmtWrapper
*
pWrapper
);
// int32_t mmProcessCreateReq(SDnode *pDnode, SRpcMsg *pRpcMsg);
// int32_t mmProcessAlterReq(SDnode *pDnode, SRpcMsg *pRpcMsg);
// int32_t mmProcessDropReq(SDnode *pDnode, SRpcMsg *pRpcMsg);
int32_t
mmProcessCreateReq
(
SMnodeMgmt
*
pMgmt
,
SNodeMsg
*
pMsg
);
int32_t
mmProcessDropReq
(
SMnodeMgmt
*
pMgmt
,
SNodeMsg
*
pMsg
);
int32_t
mmGetUserAuth
(
SMgmtWrapper
*
pWrapper
,
char
*
user
,
char
*
spi
,
char
*
encrypt
,
char
*
secret
,
char
*
ckey
);
int32_t
mmGetMonitorInfo
(
SMgmtWrapper
*
pWrapper
,
SMonClusterInfo
*
pClusterInfo
,
SMonVgroupInfo
*
pVgroupInfo
,
SMonGrantInfo
*
pGrantInfo
);
#ifdef __cplusplus
}
#endif
#endif
/*_TD_DND_MNODE_MSG_H_*/
\ No newline at end of file
#endif
/*_TD_DND_MNODE_H_*/
\ No newline at end of file
source/dnode/mgmt/mnode/inc/mmFile.h
已删除
100644 → 0
浏览文件 @
2f7cdcd9
/*
* 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_DND_MNODE_FILE_H_
#define _TD_DND_MNODE_FILE_H_
#include "mmInt.h"
#ifdef __cplusplus
extern
"C"
{
#endif
int32_t
mmReadFile
(
SMnodeMgmt
*
pMgmt
);
int32_t
mmWriteFile
(
SMnodeMgmt
*
pMgmt
);
#ifdef __cplusplus
}
#endif
#endif
/*_TD_DND_MNODE_FILE_H_*/
\ No newline at end of file
source/dnode/mgmt/mnode/inc/mmInt.h
浏览文件 @
63861e65
...
...
@@ -16,7 +16,7 @@
#ifndef _TD_DND_MNODE_INT_H_
#define _TD_DND_MNODE_INT_H_
#include "
dnd
.h"
#include "
mm
.h"
#ifdef __cplusplus
extern
"C"
{
...
...
@@ -39,13 +39,11 @@ typedef struct SMnodeMgmt {
SDnodeWorker
syncWorker
;
}
SMnodeMgmt
;
// interface
void
mmGetMgmtFp
(
SMgmtWrapper
*
pMgmt
);
int32_t
mmGetUserAuth
(
SMgmtWrapper
*
pWrapper
,
char
*
user
,
char
*
spi
,
char
*
encrypt
,
char
*
secret
,
char
*
ckey
);
int32_t
mmGetMonitorInfo
(
SMgmtWrapper
*
pWrapper
,
SMonClusterInfo
*
pClusterInfo
,
SMonVgroupInfo
*
pVgroupInfo
,
SMonGrantInfo
*
pGrantInfo
);
// mmFile.c
int32_t
mmReadFile
(
SMnodeMgmt
*
pMgmt
);
int32_t
mmWriteFile
(
SMnodeMgmt
*
pMgmt
);
// mmInt.
h
// mmInt.
c
SMnode
*
mmAcquire
(
SMnodeMgmt
*
pMgmt
);
void
mmRelease
(
SMnodeMgmt
*
pMgmt
,
SMnode
*
pMnode
);
int32_t
mmOpen
(
SMnodeMgmt
*
pMgmt
,
SMnodeOpt
*
pOption
);
...
...
@@ -53,10 +51,18 @@ int32_t mmAlter(SMnodeMgmt *pMgmt, SMnodeOpt *pOption);
int32_t
mmDrop
(
SMnodeMgmt
*
pMgmt
);
int32_t
mmBuildOptionFromReq
(
SMnodeMgmt
*
pMgmt
,
SMnodeOpt
*
pOption
,
SDCreateMnodeReq
*
pCreate
);
// mmHandle.h
int32_t
mmProcessCreateReq
(
SMnodeMgmt
*
pMgmt
,
SNodeMsg
*
pMsg
);
// mmMsg.c
int32_t
mmProcessAlterReq
(
SMnodeMgmt
*
pMgmt
,
SNodeMsg
*
pMsg
);
int32_t
mmProcessDropReq
(
SMnodeMgmt
*
pMgmt
,
SNodeMsg
*
pMsg
);
// mmWorker.c
int32_t
mmStartWorker
(
SMnodeMgmt
*
pMgmt
);
void
mmStopWorker
(
SMnodeMgmt
*
pMgmt
);
int32_t
mmProcessWriteMsg
(
SMnodeMgmt
*
pMgmt
,
SNodeMsg
*
pMsg
);
int32_t
mmProcessSyncMsg
(
SMnodeMgmt
*
pMgmt
,
SNodeMsg
*
pMsg
);
int32_t
mmProcessReadMsg
(
SMnodeMgmt
*
pMgmt
,
SNodeMsg
*
pMsg
);
int32_t
mmPutMsgToWriteQueue
(
void
*
wrapper
,
SRpcMsg
*
pRpcMsg
);
int32_t
mmPutMsgToReadQueue
(
void
*
wrapper
,
SRpcMsg
*
pRpcMsg
);
#ifdef __cplusplus
}
...
...
source/dnode/mgmt/mnode/inc/mmWorker.h
已删除
100644 → 0
浏览文件 @
2f7cdcd9
/*
* 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_DND_MNODE_WORKER_H_
#define _TD_DND_MNODE_WORKER_H_
#include "mmInt.h"
#ifdef __cplusplus
extern
"C"
{
#endif
int32_t
mmStartWorker
(
SMnodeMgmt
*
pMgmt
);
void
mmStopWorker
(
SMnodeMgmt
*
pMgmt
);
int32_t
mmProcessWriteMsg
(
SMnodeMgmt
*
pMgmt
,
SNodeMsg
*
pMsg
);
int32_t
mmProcessSyncMsg
(
SMnodeMgmt
*
pMgmt
,
SNodeMsg
*
pMsg
);
int32_t
mmProcessReadMsg
(
SMnodeMgmt
*
pMgmt
,
SNodeMsg
*
pMsg
);
int32_t
mmPutMsgToWriteQueue
(
void
*
wrapper
,
SRpcMsg
*
pRpcMsg
);
int32_t
mmPutMsgToReadQueue
(
void
*
wrapper
,
SRpcMsg
*
pRpcMsg
);
#ifdef __cplusplus
}
#endif
#endif
/*_TD_DND_MNODE_WORKER_H_*/
\ No newline at end of file
source/dnode/mgmt/mnode/src/mmFile.c
浏览文件 @
63861e65
...
...
@@ -14,7 +14,7 @@
*/
#define _DEFAULT_SOURCE
#include "mm
File
.h"
#include "mm
Int
.h"
int32_t
mmReadFile
(
SMnodeMgmt
*
pMgmt
)
{
int32_t
code
=
TSDB_CODE_DND_MNODE_READ_FILE_ERROR
;
...
...
source/dnode/mgmt/mnode/src/mmInt.c
浏览文件 @
63861e65
...
...
@@ -15,10 +15,8 @@
#define _DEFAULT_SOURCE
#include "mmInt.h"
#include "dmInt.h"
#include "mmFile.h"
#include "mmMsg.h"
#include "mmWorker.h"
SMnode
*
mmAcquire
(
SMnodeMgmt
*
pMgmt
)
{
SMnode
*
pMnode
=
NULL
;
...
...
source/dnode/mgmt/mnode/src/mmMsg.c
浏览文件 @
63861e65
...
...
@@ -14,9 +14,8 @@
*/
#define _DEFAULT_SOURCE
#include "mm
Msg
.h"
#include "mm
Int
.h"
#include "dmInt.h"
#include "mmWorker.h"
int32_t
mmProcessCreateReq
(
SMnodeMgmt
*
pMgmt
,
SNodeMsg
*
pMsg
)
{
SDnode
*
pDnode
=
pMgmt
->
pDnode
;
...
...
@@ -181,6 +180,7 @@ void mmInitMsgHandles(SMgmtWrapper *pWrapper) {
dndSetMsgHandle
(
pWrapper
,
TDMT_MND_KILL_TRANS
,
(
NodeMsgFp
)
mmProcessWriteMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_MND_GRANT
,
(
NodeMsgFp
)
mmProcessWriteMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_MND_AUTH
,
(
NodeMsgFp
)
mmProcessReadMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_DND_ALTER_MNODE
,
(
NodeMsgFp
)
mmProcessWriteMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_TOPIC
,
(
NodeMsgFp
)
mmProcessWriteMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_MND_ALTER_TOPIC
,
(
NodeMsgFp
)
mmProcessWriteMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_TOPIC
,
(
NodeMsgFp
)
mmProcessWriteMsg
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录