Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
69ca3783
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
提交
69ca3783
编写于
2月 16, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
minor changes
上级
43f7e18c
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
6 addition
and
34 deletion
+6
-34
include/common/tmsg.h
include/common/tmsg.h
+5
-4
include/common/tmsgdef.h
include/common/tmsgdef.h
+0
-1
source/common/src/tmsg.c
source/common/src/tmsg.c
+1
-1
source/dnode/mgmt/impl/src/dndMgmt.c
source/dnode/mgmt/impl/src/dndMgmt.c
+0
-3
source/dnode/mgmt/impl/src/dndTransport.c
source/dnode/mgmt/impl/src/dndTransport.c
+0
-2
source/dnode/mgmt/impl/src/dndVnodes.c
source/dnode/mgmt/impl/src/dndVnodes.c
+0
-23
未找到文件。
include/common/tmsg.h
浏览文件 @
69ca3783
...
...
@@ -759,6 +759,9 @@ typedef struct {
SReplica
replicas
[
TSDB_MAX_REPLICA
];
}
SCreateVnodeReq
,
SAlterVnodeReq
;
int32_t
tSerializeSCreateVnodeReq
(
void
*
buf
,
int32_t
bufLen
,
SCreateVnodeReq
*
pReq
);
int32_t
tDeserializeSCreateVnodeReq
(
void
*
buf
,
int32_t
bufLen
,
SCreateVnodeReq
*
pReq
);
typedef
struct
{
int32_t
vgId
;
int32_t
dnodeId
;
...
...
@@ -766,10 +769,8 @@ typedef struct {
char
db
[
TSDB_DB_FNAME_LEN
];
}
SDropVnodeReq
,
SSyncVnodeReq
,
SCompactVnodeReq
;
typedef
struct
{
int32_t
vgId
;
int8_t
accessState
;
}
SAuthVnodeReq
;
int32_t
tSerializeSDropVnodeReq
(
void
*
buf
,
int32_t
bufLen
,
SDropVnodeReq
*
pReq
);
int32_t
tDeserializeSDropVnodeReq
(
void
*
buf
,
int32_t
bufLen
,
SDropVnodeReq
*
pReq
);
typedef
struct
{
SMsgHead
header
;
...
...
include/common/tmsgdef.h
浏览文件 @
69ca3783
...
...
@@ -82,7 +82,6 @@ enum {
TD_DEF_MSG_TYPE
(
TDMT_DND_CREATE_VNODE
,
"dnode-create-vnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_DND_ALTER_VNODE
,
"dnode-alter-vnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_DND_DROP_VNODE
,
"dnode-drop-vnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_DND_AUTH_VNODE
,
"dnode-auth-vnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_DND_SYNC_VNODE
,
"dnode-sync-vnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_DND_COMPACT_VNODE
,
"dnode-compact-vnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_DND_CONFIG_DNODE
,
"dnode-config-dnode"
,
NULL
,
NULL
)
...
...
source/common/src/tmsg.c
浏览文件 @
69ca3783
...
...
@@ -1984,7 +1984,7 @@ int32_t tDeserializeSConnectRsp(void *buf, int32_t bufLen, SConnectRsp *pRsp) {
if
(
tStartDecode
(
&
decoder
)
<
0
)
return
-
1
;
if
(
tDecodeI32
(
&
decoder
,
&
pRsp
->
acctId
)
<
0
)
return
-
1
;
if
(
tDecodeI64
(
&
decoder
,
&
pRsp
->
clusterId
)
<
0
)
return
-
1
;
if
(
tDecodeI64
(
&
decoder
,
&
pRsp
->
clusterId
)
<
0
)
return
-
1
;
if
(
tDecodeI32
(
&
decoder
,
&
pRsp
->
connId
)
<
0
)
return
-
1
;
if
(
tDecodeI8
(
&
decoder
,
&
pRsp
->
superUser
)
<
0
)
return
-
1
;
if
(
tDecodeSEpSet
(
&
decoder
,
&
pRsp
->
epSet
)
<
0
)
return
-
1
;
...
...
source/dnode/mgmt/impl/src/dndMgmt.c
浏览文件 @
69ca3783
...
...
@@ -652,9 +652,6 @@ static void dndProcessMgmtQueue(SDnode *pDnode, SRpcMsg *pMsg) {
case
TDMT_DND_DROP_VNODE
:
code
=
dndProcessDropVnodeReq
(
pDnode
,
pMsg
);
break
;
case
TDMT_DND_AUTH_VNODE
:
code
=
dndProcessAuthVnodeReq
(
pDnode
,
pMsg
);
break
;
case
TDMT_DND_SYNC_VNODE
:
code
=
dndProcessSyncVnodeReq
(
pDnode
,
pMsg
);
break
;
...
...
source/dnode/mgmt/impl/src/dndTransport.c
浏览文件 @
69ca3783
...
...
@@ -57,8 +57,6 @@ static void dndInitMsgFp(STransMgmt *pMgmt) {
pMgmt
->
msgFp
[
TMSG_INDEX
(
TDMT_DND_DROP_VNODE_RSP
)]
=
dndProcessMnodeWriteMsg
;
pMgmt
->
msgFp
[
TMSG_INDEX
(
TDMT_DND_SYNC_VNODE
)]
=
dndProcessMgmtMsg
;
pMgmt
->
msgFp
[
TMSG_INDEX
(
TDMT_DND_SYNC_VNODE_RSP
)]
=
dndProcessMnodeWriteMsg
;
pMgmt
->
msgFp
[
TMSG_INDEX
(
TDMT_DND_AUTH_VNODE
)]
=
dndProcessMgmtMsg
;
pMgmt
->
msgFp
[
TMSG_INDEX
(
TDMT_DND_AUTH_VNODE_RSP
)]
=
dndProcessMnodeWriteMsg
;
pMgmt
->
msgFp
[
TMSG_INDEX
(
TDMT_DND_COMPACT_VNODE
)]
=
dndProcessMgmtMsg
;
pMgmt
->
msgFp
[
TMSG_INDEX
(
TDMT_DND_COMPACT_VNODE_RSP
)]
=
dndProcessMnodeWriteMsg
;
pMgmt
->
msgFp
[
TMSG_INDEX
(
TDMT_DND_CONFIG_DNODE
)]
=
dndProcessMgmtMsg
;
...
...
source/dnode/mgmt/impl/src/dndVnodes.c
浏览文件 @
69ca3783
...
...
@@ -562,12 +562,6 @@ static SDropVnodeReq *dndParseDropVnodeReq(SRpcMsg *pReq) {
return
pDrop
;
}
static
SAuthVnodeReq
*
dndParseAuthVnodeReq
(
SRpcMsg
*
pReq
)
{
SAuthVnodeReq
*
pAuth
=
pReq
->
pCont
;
pAuth
->
vgId
=
htonl
(
pAuth
->
vgId
);
return
pAuth
;
}
int32_t
dndProcessCreateVnodeReq
(
SDnode
*
pDnode
,
SRpcMsg
*
pReq
)
{
SCreateVnodeReq
*
pCreate
=
dndParseCreateVnodeReq
(
pReq
);
dDebug
(
"vgId:%d, create vnode req is received"
,
pCreate
->
vgId
);
...
...
@@ -683,23 +677,6 @@ int32_t dndProcessDropVnodeReq(SDnode *pDnode, SRpcMsg *pReq) {
return
0
;
}
int32_t
dndProcessAuthVnodeReq
(
SDnode
*
pDnode
,
SRpcMsg
*
pReq
)
{
SAuthVnodeReq
*
pAuth
=
(
SAuthVnodeReq
*
)
dndParseAuthVnodeReq
(
pReq
);
int32_t
vgId
=
pAuth
->
vgId
;
dDebug
(
"vgId:%d, auth vnode req is received"
,
vgId
);
SVnodeObj
*
pVnode
=
dndAcquireVnode
(
pDnode
,
vgId
);
if
(
pVnode
==
NULL
)
{
dDebug
(
"vgId:%d, failed to auth since %s"
,
vgId
,
terrstr
());
return
-
1
;
}
pVnode
->
accessState
=
pAuth
->
accessState
;
dndReleaseVnode
(
pDnode
,
pVnode
);
return
0
;
}
int32_t
dndProcessSyncVnodeReq
(
SDnode
*
pDnode
,
SRpcMsg
*
pReq
)
{
SSyncVnodeReq
*
pSync
=
(
SSyncVnodeReq
*
)
dndParseDropVnodeReq
(
pReq
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录