Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
5cebfe33
TDengine
项目概览
taosdata
/
TDengine
11 个月 前同步成功
通知
1179
Star
22014
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5cebfe33
编写于
11月 27, 2021
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
minor changes in mnode
上级
c4306958
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
16 addition
and
17 deletion
+16
-17
source/dnode/mnode/impl/inc/mnodeInt.h
source/dnode/mnode/impl/inc/mnodeInt.h
+10
-11
source/dnode/mnode/impl/src/mnode.c
source/dnode/mnode/impl/src/mnode.c
+4
-4
source/dnode/mnode/impl/src/mnodeUser.c
source/dnode/mnode/impl/src/mnodeUser.c
+2
-2
未找到文件。
source/dnode/mnode/impl/inc/mnodeInt.h
浏览文件 @
5cebfe33
...
...
@@ -24,16 +24,16 @@
extern
"C"
{
#endif
typedef
int32_t
(
*
Mn
odeRpcFp
)(
SMnodeMsg
*
pMsg
);
typedef
int32_t
(
*
Mn
dMsgFp
)(
SMnode
*
pMnode
,
SMnodeMsg
*
pMsg
);
typedef
struct
SMnodeBak
{
int32_t
dnodeId
;
int64_t
clusterId
;
tmr_h
timer
;
SSteps
*
pInitSteps
;
SSteps
*
pStartSteps
;
SMnodeOpt
para
;
Mn
odeRpcFp
msgFp
[
TSDB_MSG_TYPE_MAX
];
int32_t
dnodeId
;
int64_t
clusterId
;
tmr_h
timer
;
SSteps
*
pInitSteps
;
SSteps
*
pStartSteps
;
SMnodeOpt
para
;
Mn
dMsgFp
msgFp
[
TSDB_MSG_TYPE_MAX
];
}
SMnodeBak
;
typedef
struct
SMnode
{
...
...
@@ -47,7 +47,7 @@ typedef struct SMnode {
SSteps
*
pStartSteps
;
struct
SSdb
*
pSdb
;
struct
SDnode
*
pServer
;
Mn
odeRpcFp
msgFp
[
TSDB_MSG_TYPE_MAX
];
Mn
dMsgFp
msgFp
[
TSDB_MSG_TYPE_MAX
];
PutMsgToMnodeQFp
putMsgToApplyMsgFp
;
SendMsgToDnodeFp
sendMsgToDnodeFp
;
SendMsgToMnodeFp
sendMsgToMnodeFp
;
...
...
@@ -61,8 +61,7 @@ int64_t mnodeGetClusterId();
void
mnodeSendMsgToDnode
(
SMnode
*
pMnode
,
struct
SEpSet
*
epSet
,
struct
SRpcMsg
*
rpcMsg
);
void
mnodeSendMsgToMnode
(
SMnode
*
pMnode
,
struct
SRpcMsg
*
rpcMsg
);
void
mnodeSendRedirectMsg
(
SMnode
*
pMnode
,
struct
SRpcMsg
*
rpcMsg
,
bool
forShell
);
void
mnodeSetMsgFp
(
int32_t
msgType
,
MnodeRpcFp
fp
);
void
mnodeSetMsgHandle
(
SMnode
*
pMnode
,
int32_t
msgType
,
MndMsgFp
fp
);
#ifdef __cplusplus
}
...
...
source/dnode/mnode/impl/src/mnode.c
浏览文件 @
5cebfe33
...
...
@@ -218,18 +218,18 @@ static void mnodeProcessRpcMsg(SMnodeMsg *pMsg) {
int32_t
msgType
=
pMsg
->
rpcMsg
.
msgType
;
Mn
odeRpc
Fp
fp
=
tsMint
.
msgFp
[
msgType
];
Mn
dMsg
Fp
fp
=
tsMint
.
msgFp
[
msgType
];
if
(
fp
==
NULL
)
{
}
int32_t
code
=
(
fp
)(
pMsg
);
int32_t
code
=
(
*
fp
)(
NULL
,
pMsg
);
if
(
code
!=
0
)
{
assert
(
code
);
}
}
void
mnodeSetMsg
Fp
(
int32_t
msgType
,
MnodeRpc
Fp
fp
)
{
if
(
msgType
>
0
||
msgType
<
TSDB_MSG_TYPE_MAX
)
{
void
mnodeSetMsg
Handle
(
SMnode
*
pMnode
,
int32_t
msgType
,
MndMsg
Fp
fp
)
{
if
(
msgType
>
=
0
&&
msgType
<
TSDB_MSG_TYPE_MAX
)
{
tsMint
.
msgFp
[
msgType
]
=
fp
;
}
}
...
...
source/dnode/mnode/impl/src/mnodeUser.c
浏览文件 @
5cebfe33
...
...
@@ -179,7 +179,7 @@ static int32_t mnodeCreateUser(char *acct, char *user, char *pass, SMnodeMsg *pM
return
0
;
}
static
int32_t
mnodeProcessCreateUserMsg
(
SMnodeMsg
*
pMsg
)
{
static
int32_t
mnodeProcessCreateUserMsg
(
SMnode
*
pMnode
,
SMnode
Msg
*
pMsg
)
{
SCreateUserMsg
*
pCreate
=
pMsg
->
rpcMsg
.
pCont
;
if
(
pCreate
->
user
[
0
]
==
0
)
{
...
...
@@ -231,7 +231,7 @@ int32_t mnodeInitUser() {
.
deleteFp
=
(
SdbDeleteFp
)
mnodeUserActionDelete
};
sdbSetTable
(
table
);
mnodeSetMsg
Fp
(
TSDB_MSG_TYPE_CREATE_USER
,
mnodeProcessCreateUserMsg
);
mnodeSetMsg
Handle
(
NULL
,
TSDB_MSG_TYPE_CREATE_USER
,
mnodeProcessCreateUserMsg
);
return
0
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录