Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
f3e74788
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看板
提交
f3e74788
编写于
3月 15, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
shm
上级
dabb896a
变更
29
隐藏空白更改
内联
并排
Showing
29 changed file
with
123 addition
and
202 deletion
+123
-202
source/dnode/mgmt/bnode/inc/bmHandle.h
source/dnode/mgmt/bnode/inc/bmHandle.h
+1
-4
source/dnode/mgmt/bnode/inc/bmInt.h
source/dnode/mgmt/bnode/inc/bmInt.h
+0
-3
source/dnode/mgmt/bnode/src/bmHandle.c
source/dnode/mgmt/bnode/src/bmHandle.c
+0
-5
source/dnode/mgmt/bnode/src/bmInt.c
source/dnode/mgmt/bnode/src/bmInt.c
+1
-2
source/dnode/mgmt/container/inc/dndInt.h
source/dnode/mgmt/container/inc/dndInt.h
+2
-2
source/dnode/mgmt/container/inc/dndTransport.h
source/dnode/mgmt/container/inc/dndTransport.h
+1
-1
source/dnode/mgmt/container/src/dndInt.c
source/dnode/mgmt/container/src/dndInt.c
+8
-0
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
+3
-5
source/dnode/mgmt/dnode/inc/dmHandle.h
source/dnode/mgmt/dnode/inc/dmHandle.h
+1
-3
source/dnode/mgmt/dnode/inc/dmInt.h
source/dnode/mgmt/dnode/inc/dmInt.h
+0
-1
source/dnode/mgmt/dnode/src/dmHandle.c
source/dnode/mgmt/dnode/src/dmHandle.c
+0
-14
source/dnode/mgmt/dnode/src/dmInt.c
source/dnode/mgmt/dnode/src/dmInt.c
+0
-1
source/dnode/mgmt/mnode/inc/mmHandle.h
source/dnode/mgmt/mnode/inc/mmHandle.h
+1
-3
source/dnode/mgmt/mnode/inc/mmInt.h
source/dnode/mgmt/mnode/inc/mmInt.h
+0
-1
source/dnode/mgmt/mnode/src/mmHandle.c
source/dnode/mgmt/mnode/src/mmHandle.c
+68
-82
source/dnode/mgmt/mnode/src/mmInt.c
source/dnode/mgmt/mnode/src/mmInt.c
+0
-1
source/dnode/mgmt/qnode/inc/qmHandle.h
source/dnode/mgmt/qnode/inc/qmHandle.h
+1
-3
source/dnode/mgmt/qnode/inc/qmInt.h
source/dnode/mgmt/qnode/inc/qmInt.h
+0
-1
source/dnode/mgmt/qnode/src/qmHandle.c
source/dnode/mgmt/qnode/src/qmHandle.c
+0
-4
source/dnode/mgmt/qnode/src/qmInt.c
source/dnode/mgmt/qnode/src/qmInt.c
+0
-1
source/dnode/mgmt/snode/inc/smHandle.h
source/dnode/mgmt/snode/inc/smHandle.h
+1
-2
source/dnode/mgmt/snode/inc/smInt.h
source/dnode/mgmt/snode/inc/smInt.h
+2
-6
source/dnode/mgmt/snode/src/smHandle.c
source/dnode/mgmt/snode/src/smHandle.c
+0
-5
source/dnode/mgmt/snode/src/smInt.c
source/dnode/mgmt/snode/src/smInt.c
+0
-1
source/dnode/mgmt/vnode/inc/vmHandle.h
source/dnode/mgmt/vnode/inc/vmHandle.h
+1
-3
source/dnode/mgmt/vnode/inc/vmInt.h
source/dnode/mgmt/vnode/inc/vmInt.h
+0
-1
source/dnode/mgmt/vnode/src/vmHandle.c
source/dnode/mgmt/vnode/src/vmHandle.c
+31
-45
source/dnode/mgmt/vnode/src/vmInt.c
source/dnode/mgmt/vnode/src/vmInt.c
+0
-1
未找到文件。
source/dnode/mgmt/bnode/inc/bmHandle.h
浏览文件 @
f3e74788
...
...
@@ -22,13 +22,10 @@
extern
"C"
{
#endif
void
bmInitMsgHandles
(
SMgmtWrapper
*
pWrapper
);
SMsgHandle
bmGetMsgHandle
(
SMgmtWrapper
*
pWrapper
,
int32_t
msgIndex
);
void
bmInitMsgHandles
(
SMgmtWrapper
*
pWrapper
);
int32_t
bmProcessCreateReq
(
SDnode
*
pDnode
,
SRpcMsg
*
pRpcMsg
);
int32_t
bmProcessDropReq
(
SDnode
*
pDnode
,
SRpcMsg
*
pRpcMsg
);
#ifdef __cplusplus
}
#endif
...
...
source/dnode/mgmt/bnode/inc/bmInt.h
浏览文件 @
f3e74788
...
...
@@ -30,9 +30,6 @@ typedef struct SBnodeMgmt {
SBnode
*
pBnode
;
SRWLatch
latch
;
SDnodeWorker
writeWorker
;
//
SMsgHandle
msgHandles
[
TDMT_MAX
];
SProcObj
*
pProcess
;
bool
singleProc
;
}
SBnodeMgmt
;
...
...
source/dnode/mgmt/bnode/src/bmHandle.c
浏览文件 @
f3e74788
...
...
@@ -23,8 +23,3 @@ int32_t bmProcessDropReq(SDnode *pDnode, SRpcMsg *pRpcMsg) {return 0;}
void
bmInitMsgHandles
(
SMgmtWrapper
*
pWrapper
)
{
}
SMsgHandle
bmGetMsgHandle
(
SMgmtWrapper
*
pWrapper
,
int32_t
msgIndex
)
{
SBnodeMgmt
*
pMgmt
=
pWrapper
->
pMgmt
;
return
pMgmt
->
msgHandles
[
msgIndex
];
}
source/dnode/mgmt/bnode/src/bmInt.c
浏览文件 @
f3e74788
...
...
@@ -24,9 +24,8 @@ void bmGetMgmtFp(SMgmtWrapper *pWrapper) {
mgmtFp
.
openFp
=
NULL
;
mgmtFp
.
closeFp
=
NULL
;
mgmtFp
.
requiredFp
=
bmRequireNode
;
mgmtFp
.
getMsgHandleFp
=
bmGetMsgHandle
;
//
bmInitMsgHandles(pWrapper);
bmInitMsgHandles
(
pWrapper
);
pWrapper
->
name
=
"snode"
;
pWrapper
->
fp
=
mgmtFp
;
}
source/dnode/mgmt/container/inc/dndInt.h
浏览文件 @
f3e74788
...
...
@@ -77,7 +77,6 @@ typedef void (*NodeMsgFp)(SMgmtWrapper *pWrapper, SNodeMsg *pMsg);
typedef
int32_t
(
*
OpenNodeFp
)(
SMgmtWrapper
*
pWrapper
);
typedef
void
(
*
CloseNodeFp
)(
SMgmtWrapper
*
pWrapper
);
typedef
bool
(
*
RequireNodeFp
)(
SMgmtWrapper
*
pWrapper
);
typedef
SMsgHandle
(
*
GetMsgHandleFp
)(
SMgmtWrapper
*
pWrapper
,
int32_t
msgIndex
);
typedef
struct
SMsgHandle
{
RpcMsgFp
rpcMsgFp
;
...
...
@@ -89,7 +88,6 @@ typedef struct SMgmtFp {
OpenNodeFp
openFp
;
CloseNodeFp
closeFp
;
RequireNodeFp
requiredFp
;
GetMsgHandleFp
getMsgHandleFp
;
}
SMgmtFp
;
typedef
struct
SMgmtWrapper
{
...
...
@@ -100,6 +98,7 @@ typedef struct SMgmtWrapper {
SProcObj
*
pProc
;
void
*
pMgmt
;
SDnode
*
pDnode
;
SMsgHandle
msgHandles
[
TDMT_MAX
];
SMgmtFp
fp
;
}
SMgmtWrapper
;
...
...
@@ -145,6 +144,7 @@ void dndReportStartup(SDnode *pDnode, char *pName, char *pDesc);
void
dndGetStartup
(
SDnode
*
pDnode
,
SStartupReq
*
pStartup
);
TdFilePtr
dndCheckRunning
(
char
*
dataDir
);
SMgmtWrapper
*
dndGetWrapper
(
SDnode
*
pDnode
,
ENodeType
nodeType
);
void
dndSetMsgHandle
(
SMgmtWrapper
*
pWrapper
,
int32_t
msgType
,
NodeMsgFp
nodeMsgFp
);
// dndMonitor.h
void
dndSendMonitorReport
(
SDnode
*
pDnode
);
...
...
source/dnode/mgmt/container/inc/dndTransport.h
浏览文件 @
f3e74788
...
...
@@ -26,7 +26,7 @@ int32_t dndInitServer(SDnode *pDnode);
void
dndCleanupServer
(
SDnode
*
pDnode
);
int32_t
dndInitClient
(
SDnode
*
pDnode
);
void
dndCleanupClient
(
SDnode
*
pDnode
);
int32_t
dnd
Se
tMsgHandle
(
SDnode
*
pDnode
);
int32_t
dnd
Ini
tMsgHandle
(
SDnode
*
pDnode
);
int32_t
dndSendReqToMnode
(
SDnode
*
pDnode
,
SRpcMsg
*
pRpcMsg
);
int32_t
dndSendReqToDnode
(
SDnode
*
pDnode
,
SEpSet
*
pEpSet
,
SRpcMsg
*
pRpcMsg
);
...
...
source/dnode/mgmt/container/src/dndInt.c
浏览文件 @
f3e74788
...
...
@@ -64,6 +64,14 @@ void dndCleanup() {
SMgmtWrapper
*
dndGetWrapper
(
SDnode
*
pDnode
,
ENodeType
nodeType
)
{
return
&
pDnode
->
wrappers
[
nodeType
];
}
void
dndSetMsgHandle
(
SMgmtWrapper
*
pWrapper
,
int32_t
msgType
,
NodeMsgFp
nodeMsgFp
)
{
SMsgHandle
*
pHandle
=
&
pWrapper
->
msgHandles
[
TMSG_INDEX
(
msgType
)];
pHandle
->
pWrapper
=
pWrapper
;
pHandle
->
nodeMsgFp
=
nodeMsgFp
;
pHandle
->
rpcMsgFp
=
dndProcessRpcMsg
;
}
EDndStatus
dndGetStatus
(
SDnode
*
pDnode
)
{
return
pDnode
->
status
;
}
void
dndSetStatus
(
SDnode
*
pDnode
,
EDndStatus
status
)
{
...
...
source/dnode/mgmt/container/src/dndNode.c
浏览文件 @
f3e74788
...
...
@@ -98,7 +98,7 @@ SDnode *dndCreate(SDndCfg *pCfg) {
bmGetMgmtFp
(
&
pDnode
->
wrappers
[
BNODE
]);
memcpy
(
&
pDnode
->
cfg
,
pCfg
,
sizeof
(
SDndCfg
));
if
(
dnd
Se
tMsgHandle
(
pDnode
)
!=
0
)
{
if
(
dnd
Ini
tMsgHandle
(
pDnode
)
!=
0
)
{
goto
_OVER
;
}
...
...
source/dnode/mgmt/container/src/dndTransport.c
浏览文件 @
f3e74788
...
...
@@ -246,16 +246,14 @@ void dndCleanupServer(SDnode *pDnode) {
}
}
int32_t
dnd
Se
tMsgHandle
(
SDnode
*
pDnode
)
{
int32_t
dnd
Ini
tMsgHandle
(
SDnode
*
pDnode
)
{
STransMgmt
*
pMgmt
=
&
pDnode
->
trans
;
for
(
ENodeType
nodeType
=
0
;
nodeType
<
NODE_MAX
;
++
nodeType
)
{
SMgmtWrapper
*
pWrapper
=
&
pDnode
->
wrappers
[
nodeType
];
GetMsgHandleFp
getMsgHandleFp
=
pWrapper
->
fp
.
getMsgHandleFp
;
if
(
getMsgHandleFp
==
NULL
)
continue
;
SMgmtWrapper
*
pWrapper
=
&
pDnode
->
wrappers
[
nodeType
];
for
(
int32_t
msgIndex
=
0
;
msgIndex
<
TDMT_MAX
;
++
msgIndex
)
{
SMsgHandle
msgHandle
=
(
*
getMsgHandleFp
)(
pWrapper
,
msgIndex
)
;
SMsgHandle
msgHandle
=
pWrapper
->
msgHandles
[
msgIndex
]
;
if
(
msgHandle
.
rpcMsgFp
==
NULL
)
continue
;
SMsgHandle
*
pHandle
=
&
pMgmt
->
msgHandles
[
msgIndex
];
...
...
source/dnode/mgmt/dnode/inc/dmHandle.h
浏览文件 @
f3e74788
...
...
@@ -22,9 +22,7 @@
extern
"C"
{
#endif
void
dmInitMsgHandles
(
SMgmtWrapper
*
pWrapper
);
SMsgHandle
dmGetMsgHandle
(
SMgmtWrapper
*
pWrapper
,
int32_t
msgIndex
);
void
dmInitMsgHandles
(
SMgmtWrapper
*
pWrapper
);
void
dmSendStatusReq
(
SDnodeMgmt
*
pMgmt
);
void
dmProcessStartupReq
(
SDnode
*
pDnode
,
SRpcMsg
*
pMsg
);
int32_t
dmProcessConfigReq
(
SDnode
*
pDnode
,
SRpcMsg
*
pReq
);
...
...
source/dnode/mgmt/dnode/inc/dmInt.h
浏览文件 @
f3e74788
...
...
@@ -38,7 +38,6 @@ typedef struct SDnodeMgmt {
SRWLatch
latch
;
SDnodeWorker
mgmtWorker
;
SDnodeWorker
statusWorker
;
SMsgHandle
msgHandles
[
TDMT_MAX
];
const
char
*
path
;
SDnode
*
pDnode
;
}
SDnodeMgmt
;
...
...
source/dnode/mgmt/dnode/src/dmHandle.c
浏览文件 @
f3e74788
...
...
@@ -114,15 +114,6 @@ void dmProcessStartupReq(SDnode *pDnode, SRpcMsg *pReq) {
rpcSendResponse
(
&
rpcRsp
);
}
static
void
dndSetMsgHandle
(
SMgmtWrapper
*
pWrapper
,
int32_t
msgType
,
NodeMsgFp
nodeMsgFp
)
{
SDnodeMgmt
*
pMgmt
=
pWrapper
->
pMgmt
;
SMsgHandle
*
pHandle
=
&
pMgmt
->
msgHandles
[
TMSG_INDEX
(
msgType
)];
pHandle
->
pWrapper
=
pWrapper
;
pHandle
->
nodeMsgFp
=
nodeMsgFp
;
pHandle
->
rpcMsgFp
=
dndProcessRpcMsg
;
}
void
dmInitMsgHandles
(
SMgmtWrapper
*
pWrapper
)
{
// Requests handled by DNODE
dndSetMsgHandle
(
pWrapper
,
TDMT_DND_CREATE_MNODE
,
dmProcessMgmtMsg
);
...
...
@@ -147,8 +138,3 @@ void dmInitMsgHandles(SMgmtWrapper *pWrapper) {
dndSetMsgHandle
(
pWrapper
,
TDMT_MND_GRANT_RSP
,
dmProcessMgmtMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_MND_AUTH_RSP
,
dmProcessMgmtMsg
);
}
SMsgHandle
dmGetMsgHandle
(
SMgmtWrapper
*
pWrapper
,
int32_t
msgIndex
)
{
SDnodeMgmt
*
pMgmt
=
pWrapper
->
pMgmt
;
return
pMgmt
->
msgHandles
[
msgIndex
];
}
source/dnode/mgmt/dnode/src/dmInt.c
浏览文件 @
f3e74788
...
...
@@ -177,7 +177,6 @@ void dmGetMgmtFp(SMgmtWrapper *pWrapper) {
mgmtFp
.
openFp
=
dmInit
;
mgmtFp
.
closeFp
=
dmCleanup
;
mgmtFp
.
requiredFp
=
dmRequire
;
mgmtFp
.
getMsgHandleFp
=
dmGetMsgHandle
;
dmInitMsgHandles
(
pWrapper
);
pWrapper
->
name
=
"dnode"
;
...
...
source/dnode/mgmt/mnode/inc/mmHandle.h
浏览文件 @
f3e74788
...
...
@@ -22,9 +22,7 @@
extern
"C"
{
#endif
void
mmInitMsgHandles
(
SMgmtWrapper
*
pWrapper
);
SMsgHandle
mmGetMsgHandle
(
SMgmtWrapper
*
pWrapper
,
int32_t
msgIndex
);
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
);
...
...
source/dnode/mgmt/mnode/inc/mmInt.h
浏览文件 @
f3e74788
...
...
@@ -38,7 +38,6 @@ typedef struct SMnodeMgmt {
SReplica
replicas
[
TSDB_MAX_REPLICA
];
//
SMsgHandle
msgHandles
[
TDMT_MAX
];
SProcObj
*
pProcess
;
bool
singleProc
;
}
SMnodeMgmt
;
...
...
source/dnode/mgmt/mnode/src/mmHandle.c
浏览文件 @
f3e74788
...
...
@@ -146,92 +146,78 @@ int32_t mmProcessCreateReq(SDnode *pDnode, SRpcMsg *pRpcMsg) {return 0;}
int32_t
mmProcessAlterReq
(
SDnode
*
pDnode
,
SRpcMsg
*
pRpcMsg
)
{
return
0
;}
int32_t
mmProcessDropReq
(
SDnode
*
pDnode
,
SRpcMsg
*
pRpcMsg
)
{
return
0
;}
static
void
mmSetMsgHandle
(
SMgmtWrapper
*
pWrapper
,
int32_t
msgType
,
NodeMsgFp
nodeMsgFp
)
{
SMnodeMgmt
*
pMgmt
=
pWrapper
->
pMgmt
;
SMsgHandle
*
pHandle
=
&
pMgmt
->
msgHandles
[
TMSG_INDEX
(
msgType
)];
pHandle
->
pWrapper
=
pWrapper
;
pHandle
->
nodeMsgFp
=
nodeMsgFp
;
pHandle
->
rpcMsgFp
=
dndProcessRpcMsg
;
}
void
mmInitMsgHandles
(
SMgmtWrapper
*
pWrapper
)
{
// Requests handled by DNODE
mm
SetMsgHandle
(
pWrapper
,
TDMT_DND_CREATE_MNODE_RSP
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_DND_ALTER_MNODE_RSP
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_DND_DROP_MNODE_RSP
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_DND_CREATE_QNODE_RSP
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_DND_DROP_QNODE_RSP
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_DND_CREATE_SNODE_RSP
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_DND_DROP_SNODE_RSP
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_DND_CREATE_BNODE_RSP
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_DND_DROP_BNODE_RSP
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_DND_CREATE_VNODE_RSP
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_DND_ALTER_VNODE_RSP
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_DND_DROP_VNODE_RSP
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_DND_SYNC_VNODE_RSP
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_DND_COMPACT_VNODE_RSP
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_DND_CONFIG_DNODE_RSP
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_DND_CREATE_MNODE_RSP
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_DND_ALTER_MNODE_RSP
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_DND_DROP_MNODE_RSP
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_DND_CREATE_QNODE_RSP
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_DND_DROP_QNODE_RSP
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_DND_CREATE_SNODE_RSP
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_DND_DROP_SNODE_RSP
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_DND_CREATE_BNODE_RSP
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_DND_DROP_BNODE_RSP
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_DND_CREATE_VNODE_RSP
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_DND_ALTER_VNODE_RSP
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_DND_DROP_VNODE_RSP
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_DND_SYNC_VNODE_RSP
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_DND_COMPACT_VNODE_RSP
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_DND_CONFIG_DNODE_RSP
,
mmProcessWriteMsg
);
// Requests handled by MNODE
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_CONNECT
,
mmProcessReadMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_ACCT
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_ALTER_ACCT
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_ACCT
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_USER
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_ALTER_USER
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_USER
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_GET_USER_AUTH
,
mmProcessReadMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_DNODE
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_CONFIG_DNODE
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_DNODE
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_MNODE
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_MNODE
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_QNODE
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_QNODE
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_SNODE
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_SNODE
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_BNODE
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_BNODE
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_DB
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_DB
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_USE_DB
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_ALTER_DB
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_SYNC_DB
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_COMPACT_DB
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_FUNC
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_RETRIEVE_FUNC
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_FUNC
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_STB
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_ALTER_STB
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_STB
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_TABLE_META
,
mmProcessReadMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_VGROUP_LIST
,
mmProcessReadMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_KILL_QUERY
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_KILL_CONN
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_HEARTBEAT
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_SHOW
,
mmProcessReadMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_SHOW_RETRIEVE
,
mmProcessReadMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_STATUS
,
mmProcessReadMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_KILL_TRANS
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_GRANT
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_AUTH
,
mmProcessReadMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_TOPIC
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_ALTER_TOPIC
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_TOPIC
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_SUBSCRIBE
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_MQ_COMMIT_OFFSET
,
mmProcessWriteMsg
);
mm
SetMsgHandle
(
pWrapper
,
TDMT_MND_GET_SUB_EP
,
mmProcessReadMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_CONNECT
,
mmProcessReadMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_ACCT
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_ALTER_ACCT
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_ACCT
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_USER
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_ALTER_USER
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_USER
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_GET_USER_AUTH
,
mmProcessReadMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_DNODE
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_CONFIG_DNODE
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_DNODE
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_MNODE
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_MNODE
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_QNODE
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_QNODE
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_SNODE
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_SNODE
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_BNODE
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_BNODE
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_DB
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_DB
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_USE_DB
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_ALTER_DB
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_SYNC_DB
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_COMPACT_DB
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_FUNC
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_RETRIEVE_FUNC
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_FUNC
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_STB
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_ALTER_STB
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_STB
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_TABLE_META
,
mmProcessReadMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_VGROUP_LIST
,
mmProcessReadMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_KILL_QUERY
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_KILL_CONN
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_HEARTBEAT
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_SHOW
,
mmProcessReadMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_SHOW_RETRIEVE
,
mmProcessReadMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_STATUS
,
mmProcessReadMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_KILL_TRANS
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_GRANT
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_AUTH
,
mmProcessReadMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_TOPIC
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_ALTER_TOPIC
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_TOPIC
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_SUBSCRIBE
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_MQ_COMMIT_OFFSET
,
mmProcessWriteMsg
);
dnd
SetMsgHandle
(
pWrapper
,
TDMT_MND_GET_SUB_EP
,
mmProcessReadMsg
);
// Requests handled by VNODE
mmSetMsgHandle
(
pWrapper
,
TDMT_VND_MQ_SET_CONN_RSP
,
mmProcessWriteMsg
);
mmSetMsgHandle
(
pWrapper
,
TDMT_VND_MQ_REB_RSP
,
mmProcessWriteMsg
);
mmSetMsgHandle
(
pWrapper
,
TDMT_VND_CREATE_STB_RSP
,
mmProcessWriteMsg
);
mmSetMsgHandle
(
pWrapper
,
TDMT_VND_ALTER_STB_RSP
,
mmProcessWriteMsg
);
mmSetMsgHandle
(
pWrapper
,
TDMT_VND_DROP_STB_RSP
,
mmProcessWriteMsg
);
}
SMsgHandle
mmGetMsgHandle
(
SMgmtWrapper
*
pWrapper
,
int32_t
msgIndex
)
{
SMnodeMgmt
*
pMgmt
=
pWrapper
->
pMgmt
;
return
pMgmt
->
msgHandles
[
msgIndex
];
dndSetMsgHandle
(
pWrapper
,
TDMT_VND_MQ_SET_CONN_RSP
,
mmProcessWriteMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_VND_MQ_REB_RSP
,
mmProcessWriteMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_VND_CREATE_STB_RSP
,
mmProcessWriteMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_VND_ALTER_STB_RSP
,
mmProcessWriteMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_VND_DROP_STB_RSP
,
mmProcessWriteMsg
);
}
source/dnode/mgmt/mnode/src/mmInt.c
浏览文件 @
f3e74788
...
...
@@ -24,7 +24,6 @@ void mmGetMgmtFp(SMgmtWrapper *pWrapper) {
mgmtFp
.
openFp
=
NULL
;
mgmtFp
.
closeFp
=
NULL
;
mgmtFp
.
requiredFp
=
mmRequireNode
;
mgmtFp
.
getMsgHandleFp
=
mmGetMsgHandle
;
mmInitMsgHandles
(
pWrapper
);
pWrapper
->
name
=
"mnode"
;
...
...
source/dnode/mgmt/qnode/inc/qmHandle.h
浏览文件 @
f3e74788
...
...
@@ -22,9 +22,7 @@
extern
"C"
{
#endif
void
qmInitMsgHandles
(
SMgmtWrapper
*
pWrapper
);
SMsgHandle
qmGetMsgHandle
(
SMgmtWrapper
*
pWrapper
,
int32_t
msgIndex
);
void
qmInitMsgHandles
(
SMgmtWrapper
*
pWrapper
);
int32_t
qmProcessCreateReq
(
SDnode
*
pDnode
,
SRpcMsg
*
pRpcMsg
);
int32_t
qmProcessDropReq
(
SDnode
*
pDnode
,
SRpcMsg
*
pRpcMsg
);
...
...
source/dnode/mgmt/qnode/inc/qmInt.h
浏览文件 @
f3e74788
...
...
@@ -32,7 +32,6 @@ typedef struct SQnodeMgmt {
SDnodeWorker
fetchWorker
;
//
SMsgHandle
msgHandles
[
TDMT_MAX
];
SProcObj
*
pProcess
;
bool
singleProc
;
}
SQnodeMgmt
;
...
...
source/dnode/mgmt/qnode/src/qmHandle.c
浏览文件 @
f3e74788
...
...
@@ -23,7 +23,3 @@ int32_t qmProcessDropReq(SDnode *pDnode, SRpcMsg *pRpcMsg){return 0;}
void
qmInitMsgHandles
(
SMgmtWrapper
*
pWrapper
)
{
}
SMsgHandle
qmGetMsgHandle
(
SMgmtWrapper
*
pWrapper
,
int32_t
msgIndex
)
{
SQnodeMgmt
*
pMgmt
=
pWrapper
->
pMgmt
;
return
pMgmt
->
msgHandles
[
msgIndex
];
}
source/dnode/mgmt/qnode/src/qmInt.c
浏览文件 @
f3e74788
...
...
@@ -24,7 +24,6 @@ void qmGetMgmtFp(SMgmtWrapper *pWrapper) {
mgmtFp
.
openFp
=
NULL
;
mgmtFp
.
closeFp
=
NULL
;
mgmtFp
.
requiredFp
=
qmRequireNode
;
mgmtFp
.
getMsgHandleFp
=
qmGetMsgHandle
;
// qmInitMsgHandles(pWrapper);
pWrapper
->
name
=
"qnode"
;
...
...
source/dnode/mgmt/snode/inc/smHandle.h
浏览文件 @
f3e74788
...
...
@@ -22,8 +22,7 @@
extern
"C"
{
#endif
void
smInitMsgHandles
(
SMgmtWrapper
*
pWrapper
);
SMsgHandle
smGetMsgHandle
(
SMgmtWrapper
*
pWrapper
,
int32_t
msgIndex
);
void
smInitMsgHandles
(
SMgmtWrapper
*
pWrapper
);
#ifdef __cplusplus
}
...
...
source/dnode/mgmt/snode/inc/smInt.h
浏览文件 @
f3e74788
...
...
@@ -29,14 +29,10 @@ typedef struct SSnodeMgmt {
SSnode
*
pSnode
;
SRWLatch
latch
;
SDnodeWorker
writeWorker
;
//
SMsgHandle
msgHandles
[
TDMT_MAX
];
SProcObj
*
pProcess
;
bool
singleProc
;
SProcObj
*
pProcess
;
bool
singleProc
;
}
SSnodeMgmt
;
void
smGetMgmtFp
(
SMgmtWrapper
*
pMgmt
);
int32_t
dndInitSnode
(
SDnode
*
pDnode
);
...
...
source/dnode/mgmt/snode/src/smHandle.c
浏览文件 @
f3e74788
...
...
@@ -22,8 +22,3 @@ int32_t smProcessDropReq(SDnode *pDnode, SRpcMsg *pRpcMsg) {return 0;}
void
smInitMsgHandles
(
SMgmtWrapper
*
pWrapper
)
{
}
SMsgHandle
smGetMsgHandle
(
SMgmtWrapper
*
pWrapper
,
int32_t
msgIndex
)
{
SSnodeMgmt
*
pMgmt
=
pWrapper
->
pMgmt
;
return
pMgmt
->
msgHandles
[
msgIndex
];
}
source/dnode/mgmt/snode/src/smInt.c
浏览文件 @
f3e74788
...
...
@@ -25,7 +25,6 @@ void smGetMgmtFp(SMgmtWrapper *pWrapper) {
mgmtFp
.
openFp
=
NULL
;
mgmtFp
.
closeFp
=
NULL
;
mgmtFp
.
requiredFp
=
smRequireNode
;
mgmtFp
.
getMsgHandleFp
=
smGetMsgHandle
;
// smInitMsgHandles(pWrapper);
pWrapper
->
name
=
"snode"
;
...
...
source/dnode/mgmt/vnode/inc/vmHandle.h
浏览文件 @
f3e74788
...
...
@@ -22,9 +22,7 @@
extern
"C"
{
#endif
void
vmInitMsgHandles
(
SMgmtWrapper
*
pWrapper
);
SMsgHandle
vmGetMsgHandle
(
SMgmtWrapper
*
pWrapper
,
int32_t
msgIndex
);
void
vmInitMsgHandles
(
SMgmtWrapper
*
pWrapper
);
int32_t
vmProcessCreateVnodeReq
(
SDnode
*
pDnode
,
SRpcMsg
*
pReq
);
int32_t
vmProcessAlterVnodeReq
(
SDnode
*
pDnode
,
SRpcMsg
*
pReq
);
int32_t
vmProcessDropVnodeReq
(
SDnode
*
pDnode
,
SRpcMsg
*
pReq
);
...
...
source/dnode/mgmt/vnode/inc/vmInt.h
浏览文件 @
f3e74788
...
...
@@ -43,7 +43,6 @@ typedef struct SVnodesMgmt {
SWWorkerPool
syncPool
;
SWWorkerPool
writePool
;
STfs
*
pTfs
;
SMsgHandle
msgHandles
[
TDMT_MAX
];
SProcObj
*
pProcess
;
bool
singleProc
;
}
SVnodesMgmt
;
...
...
source/dnode/mgmt/vnode/src/vmHandle.c
浏览文件 @
f3e74788
...
...
@@ -25,51 +25,37 @@ int32_t dndProcessAuthVnodeReq(SDnode *pDnode, SRpcMsg *pReq){return 0;}
int32_t
vmProcessSyncVnodeReq
(
SDnode
*
pDnode
,
SRpcMsg
*
pReq
){
return
0
;}
int32_t
vmProcessCompactVnodeReq
(
SDnode
*
pDnode
,
SRpcMsg
*
pReq
){
return
0
;}
static
void
vmSetMsgHandle
(
SMgmtWrapper
*
pWrapper
,
int32_t
msgType
,
NodeMsgFp
nodeMsgFp
)
{
SVnodesMgmt
*
pMgmt
=
pWrapper
->
pMgmt
;
SMsgHandle
*
pHandle
=
&
pMgmt
->
msgHandles
[
TMSG_INDEX
(
msgType
)];
pHandle
->
pWrapper
=
pWrapper
;
pHandle
->
nodeMsgFp
=
nodeMsgFp
;
pHandle
->
rpcMsgFp
=
dndProcessRpcMsg
;
}
void
vmInitMsgHandles
(
SMgmtWrapper
*
pWrapper
)
{
// Requests handled by VNODE
vmSetMsgHandle
(
pWrapper
,
TDMT_VND_SUBMIT
,
vmProcessWriteMsg
);
vmSetMsgHandle
(
pWrapper
,
TDMT_VND_QUERY
,
vmProcessQueryMsg
);
vmSetMsgHandle
(
pWrapper
,
TDMT_VND_QUERY_CONTINUE
,
vmProcessQueryMsg
);
vmSetMsgHandle
(
pWrapper
,
TDMT_VND_FETCH
,
vmProcessFetchMsg
);
vmSetMsgHandle
(
pWrapper
,
TDMT_VND_FETCH_RSP
,
vmProcessFetchMsg
);
vmSetMsgHandle
(
pWrapper
,
TDMT_VND_ALTER_TABLE
,
vmProcessWriteMsg
);
vmSetMsgHandle
(
pWrapper
,
TDMT_VND_UPDATE_TAG_VAL
,
vmProcessWriteMsg
);
vmSetMsgHandle
(
pWrapper
,
TDMT_VND_TABLE_META
,
vmProcessFetchMsg
);
vmSetMsgHandle
(
pWrapper
,
TDMT_VND_TABLES_META
,
vmProcessFetchMsg
);
vmSetMsgHandle
(
pWrapper
,
TDMT_VND_MQ_CONSUME
,
vmProcessQueryMsg
);
vmSetMsgHandle
(
pWrapper
,
TDMT_VND_MQ_QUERY
,
vmProcessQueryMsg
);
vmSetMsgHandle
(
pWrapper
,
TDMT_VND_MQ_CONNECT
,
vmProcessWriteMsg
);
vmSetMsgHandle
(
pWrapper
,
TDMT_VND_MQ_DISCONNECT
,
vmProcessWriteMsg
);
vmSetMsgHandle
(
pWrapper
,
TDMT_VND_MQ_SET_CUR
,
vmProcessWriteMsg
);
vmSetMsgHandle
(
pWrapper
,
TDMT_VND_RES_READY
,
vmProcessFetchMsg
);
vmSetMsgHandle
(
pWrapper
,
TDMT_VND_TASKS_STATUS
,
vmProcessFetchMsg
);
vmSetMsgHandle
(
pWrapper
,
TDMT_VND_CANCEL_TASK
,
vmProcessFetchMsg
);
vmSetMsgHandle
(
pWrapper
,
TDMT_VND_DROP_TASK
,
vmProcessFetchMsg
);
vmSetMsgHandle
(
pWrapper
,
TDMT_VND_CREATE_STB
,
vmProcessWriteMsg
);
vmSetMsgHandle
(
pWrapper
,
TDMT_VND_ALTER_STB
,
vmProcessWriteMsg
);
vmSetMsgHandle
(
pWrapper
,
TDMT_VND_DROP_STB
,
vmProcessWriteMsg
);
vmSetMsgHandle
(
pWrapper
,
TDMT_VND_CREATE_TABLE
,
vmProcessWriteMsg
);
vmSetMsgHandle
(
pWrapper
,
TDMT_VND_ALTER_TABLE
,
vmProcessWriteMsg
);
vmSetMsgHandle
(
pWrapper
,
TDMT_VND_DROP_TABLE
,
vmProcessWriteMsg
);
vmSetMsgHandle
(
pWrapper
,
TDMT_VND_SHOW_TABLES
,
vmProcessFetchMsg
);
vmSetMsgHandle
(
pWrapper
,
TDMT_VND_SHOW_TABLES_FETCH
,
vmProcessFetchMsg
);
vmSetMsgHandle
(
pWrapper
,
TDMT_VND_MQ_SET_CONN
,
vmProcessWriteMsg
);
vmSetMsgHandle
(
pWrapper
,
TDMT_VND_MQ_REB
,
vmProcessWriteMsg
);
vmSetMsgHandle
(
pWrapper
,
TDMT_VND_MQ_SET_CUR
,
vmProcessFetchMsg
);
vmSetMsgHandle
(
pWrapper
,
TDMT_VND_CONSUME
,
vmProcessFetchMsg
);
vmSetMsgHandle
(
pWrapper
,
TDMT_VND_QUERY_HEARTBEAT
,
vmProcessFetchMsg
);
}
SMsgHandle
vmGetMsgHandle
(
SMgmtWrapper
*
pWrapper
,
int32_t
msgIndex
)
{
SVnodesMgmt
*
pMgmt
=
pWrapper
->
pMgmt
;
return
pMgmt
->
msgHandles
[
msgIndex
];
dndSetMsgHandle
(
pWrapper
,
TDMT_VND_SUBMIT
,
vmProcessWriteMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_VND_QUERY
,
vmProcessQueryMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_VND_QUERY_CONTINUE
,
vmProcessQueryMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_VND_FETCH
,
vmProcessFetchMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_VND_FETCH_RSP
,
vmProcessFetchMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_VND_ALTER_TABLE
,
vmProcessWriteMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_VND_UPDATE_TAG_VAL
,
vmProcessWriteMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_VND_TABLE_META
,
vmProcessFetchMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_VND_TABLES_META
,
vmProcessFetchMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_VND_MQ_CONSUME
,
vmProcessQueryMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_VND_MQ_QUERY
,
vmProcessQueryMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_VND_MQ_CONNECT
,
vmProcessWriteMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_VND_MQ_DISCONNECT
,
vmProcessWriteMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_VND_MQ_SET_CUR
,
vmProcessWriteMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_VND_RES_READY
,
vmProcessFetchMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_VND_TASKS_STATUS
,
vmProcessFetchMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_VND_CANCEL_TASK
,
vmProcessFetchMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_VND_DROP_TASK
,
vmProcessFetchMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_VND_CREATE_STB
,
vmProcessWriteMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_VND_ALTER_STB
,
vmProcessWriteMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_VND_DROP_STB
,
vmProcessWriteMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_VND_CREATE_TABLE
,
vmProcessWriteMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_VND_ALTER_TABLE
,
vmProcessWriteMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_VND_DROP_TABLE
,
vmProcessWriteMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_VND_SHOW_TABLES
,
vmProcessFetchMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_VND_SHOW_TABLES_FETCH
,
vmProcessFetchMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_VND_MQ_SET_CONN
,
vmProcessWriteMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_VND_MQ_REB
,
vmProcessWriteMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_VND_MQ_SET_CUR
,
vmProcessFetchMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_VND_CONSUME
,
vmProcessFetchMsg
);
dndSetMsgHandle
(
pWrapper
,
TDMT_VND_QUERY_HEARTBEAT
,
vmProcessFetchMsg
);
}
source/dnode/mgmt/vnode/src/vmInt.c
浏览文件 @
f3e74788
...
...
@@ -67,7 +67,6 @@ void vmGetMgmtFp(SMgmtWrapper *pWrapper) {
mgmtFp
.
openFp
=
vmInit
;
mgmtFp
.
closeFp
=
vmCleanup
;
mgmtFp
.
requiredFp
=
vmRequire
;
mgmtFp
.
getMsgHandleFp
=
vmGetMsgHandle
;
vmInitMsgHandles
(
pWrapper
);
pWrapper
->
name
=
"vnodes"
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录