Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
c4b409c3
T
TDengine
项目概览
taosdata
/
TDengine
大约 2 年 前同步成功
通知
1193
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看板
提交
c4b409c3
编写于
5月 10, 2022
作者:
S
Shengliang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactror: node mgmt
上级
de175185
变更
12
显示空白变更内容
内联
并排
Showing
12 changed file
with
194 addition
and
200 deletion
+194
-200
include/util/tdef.h
include/util/tdef.h
+5
-2
source/dnode/mgmt/mgmt_bnode/src/bmHandle.c
source/dnode/mgmt/mgmt_bnode/src/bmHandle.c
+1
-1
source/dnode/mgmt/mgmt_mnode/src/mmHandle.c
source/dnode/mgmt/mgmt_mnode/src/mmHandle.c
+84
-84
source/dnode/mgmt/mgmt_qnode/src/qmHandle.c
source/dnode/mgmt/mgmt_qnode/src/qmHandle.c
+11
-11
source/dnode/mgmt/mgmt_snode/src/smHandle.c
source/dnode/mgmt/mgmt_snode/src/smHandle.c
+3
-3
source/dnode/mgmt/mgmt_vnode/src/vmHandle.c
source/dnode/mgmt/mgmt_vnode/src/vmHandle.c
+50
-50
source/dnode/mgmt/node_common/inc/dmDef.h
source/dnode/mgmt/node_common/inc/dmDef.h
+3
-4
source/dnode/mgmt/node_common/inc/dmInt.h
source/dnode/mgmt/node_common/inc/dmInt.h
+1
-1
source/dnode/mgmt/node_common/src/dmFile.c
source/dnode/mgmt/node_common/src/dmFile.c
+1
-1
source/dnode/mgmt/node_common/src/dmUtil.c
source/dnode/mgmt/node_common/src/dmUtil.c
+2
-2
source/dnode/mgmt/node_mgmt/src/dmHandle.c
source/dnode/mgmt/node_mgmt/src/dmHandle.c
+11
-11
source/dnode/mgmt/node_mgmt/src/dmTransport.c
source/dnode/mgmt/node_mgmt/src/dmTransport.c
+22
-30
未找到文件。
include/util/tdef.h
浏览文件 @
c4b409c3
...
@@ -425,9 +425,12 @@ enum {
...
@@ -425,9 +425,12 @@ enum {
SND_WORKER_TYPE__UNIQUE
,
SND_WORKER_TYPE__UNIQUE
,
};
};
#define MNODE_HANDLE -1
#define QNODE_HANDLE 1
#define DEFAULT_HANDLE 0
#define DEFAULT_HANDLE 0
#define MNODE_HANDLE -1
#define QNODE_HANDLE -2
#define SNODE_HANDLE -3
#define VNODE_HANDLE -4
#define BNODE_HANDLE -5
#define TSDB_CONFIG_OPTION_LEN 16
#define TSDB_CONFIG_OPTION_LEN 16
#define TSDB_CONIIG_VALUE_LEN 48
#define TSDB_CONIIG_VALUE_LEN 48
...
...
source/dnode/mgmt/mgmt_bnode/src/bmHandle.c
浏览文件 @
c4b409c3
...
@@ -94,5 +94,5 @@ int32_t bmProcessDropReq(SMgmtWrapper *pWrapper, SNodeMsg *pMsg) {
...
@@ -94,5 +94,5 @@ int32_t bmProcessDropReq(SMgmtWrapper *pWrapper, SNodeMsg *pMsg) {
}
}
void
bmInitMsgHandle
(
SMgmtWrapper
*
pWrapper
)
{
void
bmInitMsgHandle
(
SMgmtWrapper
*
pWrapper
)
{
dmSetMsgHandle
(
pWrapper
,
TDMT_MON_BM_INFO
,
bmProcessMonitorMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MON_BM_INFO
,
bmProcessMonitorMsg
,
0
);
}
}
source/dnode/mgmt/mgmt_mnode/src/mmHandle.c
浏览文件 @
c4b409c3
...
@@ -144,94 +144,94 @@ int32_t mmProcessAlterReq(SMnodeMgmt *pMgmt, SNodeMsg *pMsg) {
...
@@ -144,94 +144,94 @@ int32_t mmProcessAlterReq(SMnodeMgmt *pMgmt, SNodeMsg *pMsg) {
}
}
void
mmInitMsgHandle
(
SMgmtWrapper
*
pWrapper
)
{
void
mmInitMsgHandle
(
SMgmtWrapper
*
pWrapper
)
{
dmSetMsgHandle
(
pWrapper
,
TDMT_MON_MM_INFO
,
mmProcessMonitorMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MON_MM_INFO
,
mmProcessMonitorMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MON_MM_LOAD
,
mmProcessMonitorMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MON_MM_LOAD
,
mmProcessMonitorMsg
,
0
);
// Requests handled by DNODE
// Requests handled by DNODE
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_CREATE_MNODE_RSP
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_CREATE_MNODE_RSP
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_ALTER_MNODE_RSP
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_ALTER_MNODE_RSP
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_DROP_MNODE_RSP
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_DROP_MNODE_RSP
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_CREATE_QNODE_RSP
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_CREATE_QNODE_RSP
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_DROP_QNODE_RSP
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_DROP_QNODE_RSP
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_CREATE_SNODE_RSP
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_CREATE_SNODE_RSP
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_DROP_SNODE_RSP
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_DROP_SNODE_RSP
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_CREATE_BNODE_RSP
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_CREATE_BNODE_RSP
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_DROP_BNODE_RSP
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_DROP_BNODE_RSP
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_CREATE_VNODE_RSP
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_CREATE_VNODE_RSP
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_DROP_VNODE_RSP
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_DROP_VNODE_RSP
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_CONFIG_DNODE_RSP
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_CONFIG_DNODE_RSP
,
mmProcessWriteMsg
,
0
);
// Requests handled by MNODE
// Requests handled by MNODE
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_CONNECT
,
mmProcessReadMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_CONNECT
,
mmProcessReadMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_ACCT
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_ACCT
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_ALTER_ACCT
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_ALTER_ACCT
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_ACCT
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_ACCT
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_USER
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_USER
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_ALTER_USER
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_ALTER_USER
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_USER
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_USER
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_GET_USER_AUTH
,
mmProcessReadMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_GET_USER_AUTH
,
mmProcessReadMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_DNODE
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_DNODE
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_CONFIG_DNODE
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_CONFIG_DNODE
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_DNODE
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_DNODE
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_MNODE
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_MNODE
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_MNODE
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_MNODE
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_QNODE
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_QNODE
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_QNODE
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_QNODE
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_QNODE_LIST
,
mmProcessReadMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_QNODE_LIST
,
mmProcessReadMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_SNODE
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_SNODE
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_SNODE
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_SNODE
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_BNODE
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_BNODE
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_BNODE
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_BNODE
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_DB
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_DB
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_DB
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_DB
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_USE_DB
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_USE_DB
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_ALTER_DB
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_ALTER_DB
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_COMPACT_DB
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_COMPACT_DB
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_FUNC
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_FUNC
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_RETRIEVE_FUNC
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_RETRIEVE_FUNC
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_FUNC
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_FUNC
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_STB
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_STB
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_ALTER_STB
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_ALTER_STB
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_STB
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_STB
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_SMA
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_SMA
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_SMA
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_SMA
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_TABLE_META
,
mmProcessReadMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_TABLE_META
,
mmProcessReadMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_VGROUP_LIST
,
mmProcessReadMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_VGROUP_LIST
,
mmProcessReadMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_KILL_QUERY
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_KILL_QUERY
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_KILL_CONN
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_KILL_CONN
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_HEARTBEAT
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_HEARTBEAT
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_SYSTABLE_RETRIEVE
,
mmProcessReadMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_SYSTABLE_RETRIEVE
,
mmProcessReadMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_STATUS
,
mmProcessReadMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_STATUS
,
mmProcessReadMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_KILL_TRANS
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_KILL_TRANS
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_GRANT
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_GRANT
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_AUTH
,
mmProcessReadMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_AUTH
,
mmProcessReadMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_ALTER_MNODE
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_ALTER_MNODE
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_TOPIC
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_TOPIC
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_ALTER_TOPIC
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_ALTER_TOPIC
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_TOPIC
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_DROP_TOPIC
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_SUBSCRIBE
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_SUBSCRIBE
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_MQ_COMMIT_OFFSET
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_MQ_COMMIT_OFFSET
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_MQ_ASK_EP
,
mmProcessReadMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_MQ_ASK_EP
,
mmProcessReadMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_MQ_VG_CHANGE_RSP
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_MQ_VG_CHANGE_RSP
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_STREAM
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_CREATE_STREAM
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_TASK_DEPLOY_RSP
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_TASK_DEPLOY_RSP
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_GET_DB_CFG
,
mmProcessReadMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_GET_DB_CFG
,
mmProcessReadMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_GET_INDEX
,
mmProcessReadMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_GET_INDEX
,
mmProcessReadMsg
,
0
);
// Requests handled by VNODE
// Requests handled by VNODE
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_CREATE_STB_RSP
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_CREATE_STB_RSP
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_ALTER_STB_RSP
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_ALTER_STB_RSP
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_DROP_STB_RSP
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_DROP_STB_RSP
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_CREATE_SMA_RSP
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_CREATE_SMA_RSP
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_DROP_SMA_RSP
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_DROP_SMA_RSP
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_QUERY
,
mmProcessQueryMsg
,
MNODE_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_QUERY
,
mmProcessQueryMsg
,
1
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_QUERY_CONTINUE
,
mmProcessQueryMsg
,
MNODE_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_QUERY_CONTINUE
,
mmProcessQueryMsg
,
1
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_FETCH
,
mmProcessQueryMsg
,
MNODE_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_FETCH
,
mmProcessQueryMsg
,
1
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_DROP_TASK
,
mmProcessQueryMsg
,
MNODE_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_DROP_TASK
,
mmProcessQueryMsg
,
1
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_QUERY_HEARTBEAT
,
mmProcessQueryMsg
,
MNODE_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_QUERY_HEARTBEAT
,
mmProcessQueryMsg
,
1
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_ALTER_VNODE_RSP
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_ALTER_VNODE_RSP
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_SYNC_VNODE_RSP
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_SYNC_VNODE_RSP
,
mmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_COMPACT_VNODE_RSP
,
mmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_COMPACT_VNODE_RSP
,
mmProcessWriteMsg
,
0
);
}
}
source/dnode/mgmt/mgmt_qnode/src/qmHandle.c
浏览文件 @
c4b409c3
...
@@ -94,17 +94,17 @@ int32_t qmProcessDropReq(SMgmtWrapper *pWrapper, SNodeMsg *pMsg) {
...
@@ -94,17 +94,17 @@ int32_t qmProcessDropReq(SMgmtWrapper *pWrapper, SNodeMsg *pMsg) {
}
}
void
qmInitMsgHandle
(
SMgmtWrapper
*
pWrapper
)
{
void
qmInitMsgHandle
(
SMgmtWrapper
*
pWrapper
)
{
dmSetMsgHandle
(
pWrapper
,
TDMT_MON_QM_INFO
,
qmProcessMonitorMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MON_QM_INFO
,
qmProcessMonitorMsg
,
0
);
// Requests handled by VNODE
// Requests handled by VNODE
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_QUERY
,
qmProcessQueryMsg
,
QNODE_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_QUERY
,
qmProcessQueryMsg
,
1
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_QUERY_CONTINUE
,
qmProcessQueryMsg
,
QNODE_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_QUERY_CONTINUE
,
qmProcessQueryMsg
,
1
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_FETCH
,
qmProcessFetchMsg
,
QNODE_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_FETCH
,
qmProcessFetchMsg
,
1
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_FETCH_RSP
,
qmProcessFetchMsg
,
QNODE_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_FETCH_RSP
,
qmProcessFetchMsg
,
1
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_QUERY_HEARTBEAT
,
qmProcessFetchMsg
,
QNODE_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_QUERY_HEARTBEAT
,
qmProcessFetchMsg
,
1
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_RES_READY
,
qmProcessFetchMsg
,
QNODE_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_RES_READY
,
qmProcessFetchMsg
,
1
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_TASKS_STATUS
,
qmProcessFetchMsg
,
QNODE_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_TASKS_STATUS
,
qmProcessFetchMsg
,
1
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_CANCEL_TASK
,
qmProcessFetchMsg
,
QNODE_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_CANCEL_TASK
,
qmProcessFetchMsg
,
1
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_DROP_TASK
,
qmProcessFetchMsg
,
QNODE_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_DROP_TASK
,
qmProcessFetchMsg
,
1
);
}
}
source/dnode/mgmt/mgmt_snode/src/smHandle.c
浏览文件 @
c4b409c3
...
@@ -94,9 +94,9 @@ int32_t smProcessDropReq(SMgmtWrapper *pWrapper, SNodeMsg *pMsg) {
...
@@ -94,9 +94,9 @@ int32_t smProcessDropReq(SMgmtWrapper *pWrapper, SNodeMsg *pMsg) {
}
}
void
smInitMsgHandle
(
SMgmtWrapper
*
pWrapper
)
{
void
smInitMsgHandle
(
SMgmtWrapper
*
pWrapper
)
{
dmSetMsgHandle
(
pWrapper
,
TDMT_MON_SM_INFO
,
smProcessMonitorMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MON_SM_INFO
,
smProcessMonitorMsg
,
0
);
// Requests handled by SNODE
// Requests handled by SNODE
dmSetMsgHandle
(
pWrapper
,
TDMT_SND_TASK_DEPLOY
,
smProcessMgmtMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_SND_TASK_DEPLOY
,
smProcessMgmtMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_SND_TASK_EXEC
,
smProcessExecMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_SND_TASK_EXEC
,
smProcessExecMsg
,
0
);
}
}
source/dnode/mgmt/mgmt_vnode/src/vmHandle.c
浏览文件 @
c4b409c3
...
@@ -281,56 +281,56 @@ int32_t vmProcessDropVnodeReq(SVnodesMgmt *pMgmt, SNodeMsg *pMsg) {
...
@@ -281,56 +281,56 @@ int32_t vmProcessDropVnodeReq(SVnodesMgmt *pMgmt, SNodeMsg *pMsg) {
}
}
void
vmInitMsgHandle
(
SMgmtWrapper
*
pWrapper
)
{
void
vmInitMsgHandle
(
SMgmtWrapper
*
pWrapper
)
{
dmSetMsgHandle
(
pWrapper
,
TDMT_MON_VM_INFO
,
vmProcessMonitorMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MON_VM_INFO
,
vmProcessMonitorMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MON_VM_LOAD
,
vmProcessMonitorMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MON_VM_LOAD
,
vmProcessMonitorMsg
,
0
);
// Requests handled by VNODE
// Requests handled by VNODE
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_SUBMIT
,
vmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_SUBMIT
,
vmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_QUERY
,
vmProcessQueryMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_QUERY
,
vmProcessQueryMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_QUERY_CONTINUE
,
vmProcessQueryMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_QUERY_CONTINUE
,
vmProcessQueryMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_FETCH
,
vmProcessFetchMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_FETCH
,
vmProcessFetchMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_ALTER_TABLE
,
vmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_ALTER_TABLE
,
vmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_UPDATE_TAG_VAL
,
vmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_UPDATE_TAG_VAL
,
vmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_TABLE_META
,
vmProcessFetchMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_TABLE_META
,
vmProcessFetchMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_TABLES_META
,
vmProcessFetchMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_TABLES_META
,
vmProcessFetchMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_MQ_CONSUME
,
vmProcessQueryMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_MQ_CONSUME
,
vmProcessQueryMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_MQ_QUERY
,
vmProcessQueryMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_MQ_QUERY
,
vmProcessQueryMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_MQ_CONNECT
,
vmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_MQ_CONNECT
,
vmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_MQ_DISCONNECT
,
vmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_MQ_DISCONNECT
,
vmProcessWriteMsg
,
0
);
// dmSetMsgHandle(pWrapper, TDMT_VND_MQ_SET_CUR, vmProcessWriteMsg,
DEFAULT_HANDLE
);
// dmSetMsgHandle(pWrapper, TDMT_VND_MQ_SET_CUR, vmProcessWriteMsg,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_RES_READY
,
vmProcessFetchMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_RES_READY
,
vmProcessFetchMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_TASKS_STATUS
,
vmProcessFetchMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_TASKS_STATUS
,
vmProcessFetchMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_CANCEL_TASK
,
vmProcessFetchMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_CANCEL_TASK
,
vmProcessFetchMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_DROP_TASK
,
vmProcessFetchMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_DROP_TASK
,
vmProcessFetchMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_CREATE_STB
,
vmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_CREATE_STB
,
vmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_ALTER_STB
,
vmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_ALTER_STB
,
vmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_DROP_STB
,
vmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_DROP_STB
,
vmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_CREATE_TABLE
,
vmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_CREATE_TABLE
,
vmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_DROP_TABLE
,
vmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_DROP_TABLE
,
vmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_CREATE_SMA
,
vmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_CREATE_SMA
,
vmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_CANCEL_SMA
,
vmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_CANCEL_SMA
,
vmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_DROP_SMA
,
vmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_DROP_SMA
,
vmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_SUBMIT_RSMA
,
vmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_SUBMIT_RSMA
,
vmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_MQ_VG_CHANGE
,
vmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_MQ_VG_CHANGE
,
vmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_CONSUME
,
vmProcessFetchMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_CONSUME
,
vmProcessFetchMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_TASK_DEPLOY
,
vmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_TASK_DEPLOY
,
vmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_QUERY_HEARTBEAT
,
vmProcessFetchMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_QUERY_HEARTBEAT
,
vmProcessFetchMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_TASK_PIPE_EXEC
,
vmProcessFetchMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_TASK_PIPE_EXEC
,
vmProcessFetchMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_TASK_MERGE_EXEC
,
vmProcessMergeMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_TASK_MERGE_EXEC
,
vmProcessMergeMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_TASK_WRITE_EXEC
,
vmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_TASK_WRITE_EXEC
,
vmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_STREAM_TRIGGER
,
vmProcessFetchMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_STREAM_TRIGGER
,
vmProcessFetchMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_ALTER_VNODE
,
vmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_ALTER_VNODE
,
vmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_COMPACT_VNODE
,
vmProcessWriteMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_COMPACT_VNODE
,
vmProcessWriteMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_CREATE_VNODE
,
vmProcessMgmtMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_CREATE_VNODE
,
vmProcessMgmtMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_DROP_VNODE
,
vmProcessMgmtMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_DROP_VNODE
,
vmProcessMgmtMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_SYNC_TIMEOUT
,
vmProcessSyncMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_SYNC_TIMEOUT
,
vmProcessSyncMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_SYNC_PING
,
vmProcessSyncMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_SYNC_PING
,
vmProcessSyncMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_SYNC_PING_REPLY
,
vmProcessSyncMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_SYNC_PING_REPLY
,
vmProcessSyncMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_SYNC_CLIENT_REQUEST
,
vmProcessSyncMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_SYNC_CLIENT_REQUEST
,
vmProcessSyncMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_SYNC_CLIENT_REQUEST_REPLY
,
vmProcessSyncMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_SYNC_CLIENT_REQUEST_REPLY
,
vmProcessSyncMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_SYNC_REQUEST_VOTE
,
vmProcessSyncMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_SYNC_REQUEST_VOTE
,
vmProcessSyncMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_SYNC_REQUEST_VOTE_REPLY
,
vmProcessSyncMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_SYNC_REQUEST_VOTE_REPLY
,
vmProcessSyncMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_SYNC_APPEND_ENTRIES
,
vmProcessSyncMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_SYNC_APPEND_ENTRIES
,
vmProcessSyncMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_SYNC_APPEND_ENTRIES_REPLY
,
vmProcessSyncMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_VND_SYNC_APPEND_ENTRIES_REPLY
,
vmProcessSyncMsg
,
0
);
}
}
source/dnode/mgmt/node_common/inc/dmDef.h
浏览文件 @
c4b409c3
...
@@ -89,9 +89,8 @@ typedef int32_t (*DropNodeFp)(struct SMgmtWrapper *pWrapper, SNodeMsg *pMsg);
...
@@ -89,9 +89,8 @@ typedef int32_t (*DropNodeFp)(struct SMgmtWrapper *pWrapper, SNodeMsg *pMsg);
typedef
int32_t
(
*
RequireNodeFp
)(
struct
SMgmtWrapper
*
pWrapper
,
bool
*
required
);
typedef
int32_t
(
*
RequireNodeFp
)(
struct
SMgmtWrapper
*
pWrapper
,
bool
*
required
);
typedef
struct
{
typedef
struct
{
SMgmtWrapper
*
pQndWrapper
;
EDndNodeType
defaultNtype
;
SMgmtWrapper
*
pMndWrapper
;
bool
needCheckVgId
;
SMgmtWrapper
*
pNdWrapper
;
}
SMsgHandle
;
}
SMsgHandle
;
typedef
struct
{
typedef
struct
{
...
@@ -124,7 +123,7 @@ typedef struct SMgmtWrapper {
...
@@ -124,7 +123,7 @@ typedef struct SMgmtWrapper {
SShm
procShm
;
SShm
procShm
;
};
};
struct
{
struct
{
int8_t
msgVgIds
[
TDMT_MAX
];
// Handle the case where the same message type is distributed to qnode or vnode
bool
needCheckVgIds
[
TDMT_MAX
];
NodeMsgFp
msgFps
[
TDMT_MAX
];
NodeMsgFp
msgFps
[
TDMT_MAX
];
};
};
}
SMgmtWrapper
;
}
SMgmtWrapper
;
...
...
source/dnode/mgmt/node_common/inc/dmInt.h
浏览文件 @
c4b409c3
...
@@ -34,7 +34,7 @@ const char *dmProcStr(EDndProcType ptype);
...
@@ -34,7 +34,7 @@ const char *dmProcStr(EDndProcType ptype);
void
dmSetStatus
(
SDnode
*
pDnode
,
EDndRunStatus
stype
);
void
dmSetStatus
(
SDnode
*
pDnode
,
EDndRunStatus
stype
);
void
dmSetEvent
(
SDnode
*
pDnode
,
EDndEvent
event
);
void
dmSetEvent
(
SDnode
*
pDnode
,
EDndEvent
event
);
void
dmSetMsgHandle
(
SMgmtWrapper
*
pWrapper
,
tmsg_t
msgType
,
NodeMsgFp
nodeMsgFp
,
int8_t
vgId
);
void
dmSetMsgHandle
(
SMgmtWrapper
*
pWrapper
,
tmsg_t
msgType
,
NodeMsgFp
nodeMsgFp
,
bool
needCheckVgIds
);
void
dmReportStartup
(
SDnode
*
pDnode
,
const
char
*
pName
,
const
char
*
pDesc
);
void
dmReportStartup
(
SDnode
*
pDnode
,
const
char
*
pName
,
const
char
*
pDesc
);
void
dmReportStartupByWrapper
(
SMgmtWrapper
*
pWrapper
,
const
char
*
pName
,
const
char
*
pDesc
);
void
dmReportStartupByWrapper
(
SMgmtWrapper
*
pWrapper
,
const
char
*
pName
,
const
char
*
pDesc
);
void
dmProcessServerStatusReq
(
SDnode
*
pDnode
,
SRpcMsg
*
pMsg
);
void
dmProcessServerStatusReq
(
SDnode
*
pDnode
,
SRpcMsg
*
pMsg
);
...
...
source/dnode/mgmt/node_common/src/dmFile.c
浏览文件 @
c4b409c3
...
@@ -173,7 +173,7 @@ int32_t dmReadShmFile(SMgmtWrapper *pWrapper) {
...
@@ -173,7 +173,7 @@ int32_t dmReadShmFile(SMgmtWrapper *pWrapper) {
}
}
}
}
if
(
!
tsMultiProcess
||
pWrapper
->
nodeType
==
DNODE
||
pWrapper
->
nodeType
==
NODE_END
)
{
if
(
!
tsMultiProcess
||
pWrapper
->
nodeType
==
DNODE
)
{
if
(
pWrapper
->
procShm
.
id
>=
0
)
{
if
(
pWrapper
->
procShm
.
id
>=
0
)
{
dDebug
(
"node:%s, shmid:%d, is closed, size:%d"
,
pWrapper
->
name
,
pWrapper
->
procShm
.
id
,
pWrapper
->
procShm
.
size
);
dDebug
(
"node:%s, shmid:%d, is closed, size:%d"
,
pWrapper
->
name
,
pWrapper
->
procShm
.
id
,
pWrapper
->
procShm
.
size
);
taosDropShm
(
&
pWrapper
->
procShm
);
taosDropShm
(
&
pWrapper
->
procShm
);
...
...
source/dnode/mgmt/node_common/src/dmUtil.c
浏览文件 @
c4b409c3
...
@@ -29,9 +29,9 @@ void dmSetEvent(SDnode *pDnode, EDndEvent event) {
...
@@ -29,9 +29,9 @@ void dmSetEvent(SDnode *pDnode, EDndEvent event) {
}
}
}
}
void
dmSetMsgHandle
(
SMgmtWrapper
*
pWrapper
,
tmsg_t
msgType
,
NodeMsgFp
nodeMsgFp
,
int8_t
v
gId
)
{
void
dmSetMsgHandle
(
SMgmtWrapper
*
pWrapper
,
tmsg_t
msgType
,
NodeMsgFp
nodeMsgFp
,
bool
needCheckV
gId
)
{
pWrapper
->
msgFps
[
TMSG_INDEX
(
msgType
)]
=
nodeMsgFp
;
pWrapper
->
msgFps
[
TMSG_INDEX
(
msgType
)]
=
nodeMsgFp
;
pWrapper
->
msgVgIds
[
TMSG_INDEX
(
msgType
)]
=
v
gId
;
pWrapper
->
needCheckVgIds
[
TMSG_INDEX
(
msgType
)]
=
needCheckV
gId
;
}
}
SMgmtWrapper
*
dmAcquireWrapper
(
SDnode
*
pDnode
,
EDndNodeType
ntype
)
{
SMgmtWrapper
*
dmAcquireWrapper
(
SDnode
*
pDnode
,
EDndNodeType
ntype
)
{
...
...
source/dnode/mgmt/node_mgmt/src/dmHandle.c
浏览文件 @
c4b409c3
...
@@ -187,19 +187,19 @@ int32_t dmProcessDropNodeReq(SDnode *pDnode, EDndNodeType ntype, SNodeMsg *pMsg)
...
@@ -187,19 +187,19 @@ int32_t dmProcessDropNodeReq(SDnode *pDnode, EDndNodeType ntype, SNodeMsg *pMsg)
static
void
dmSetMgmtMsgHandle
(
SMgmtWrapper
*
pWrapper
)
{
static
void
dmSetMgmtMsgHandle
(
SMgmtWrapper
*
pWrapper
)
{
// Requests handled by DNODE
// Requests handled by DNODE
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_CREATE_MNODE
,
dmProcessMgmtMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_CREATE_MNODE
,
dmProcessMgmtMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_DROP_MNODE
,
dmProcessMgmtMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_DROP_MNODE
,
dmProcessMgmtMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_CREATE_QNODE
,
dmProcessMgmtMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_CREATE_QNODE
,
dmProcessMgmtMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_DROP_QNODE
,
dmProcessMgmtMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_DROP_QNODE
,
dmProcessMgmtMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_CREATE_SNODE
,
dmProcessMgmtMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_CREATE_SNODE
,
dmProcessMgmtMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_DROP_SNODE
,
dmProcessMgmtMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_DROP_SNODE
,
dmProcessMgmtMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_CREATE_BNODE
,
dmProcessMgmtMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_CREATE_BNODE
,
dmProcessMgmtMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_DROP_BNODE
,
dmProcessMgmtMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_DROP_BNODE
,
dmProcessMgmtMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_CONFIG_DNODE
,
dmProcessMgmtMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_DND_CONFIG_DNODE
,
dmProcessMgmtMsg
,
0
);
// Requests handled by MNODE
// Requests handled by MNODE
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_GRANT_RSP
,
dmProcessMgmtMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_GRANT_RSP
,
dmProcessMgmtMsg
,
0
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_AUTH_RSP
,
dmProcessMgmtMsg
,
DEFAULT_HANDLE
);
dmSetMsgHandle
(
pWrapper
,
TDMT_MND_AUTH_RSP
,
dmProcessMgmtMsg
,
0
);
}
}
static
int32_t
dmStartMgmt
(
SMgmtWrapper
*
pWrapper
)
{
static
int32_t
dmStartMgmt
(
SMgmtWrapper
*
pWrapper
)
{
...
...
source/dnode/mgmt/node_mgmt/src/dmTransport.c
浏览文件 @
c4b409c3
...
@@ -133,7 +133,7 @@ static void dmProcessMsg(SDnode *pDnode, SRpcMsg *pMsg, SEpSet *pEpSet) {
...
@@ -133,7 +133,7 @@ static void dmProcessMsg(SDnode *pDnode, SRpcMsg *pMsg, SEpSet *pEpSet) {
tmsg_t
msgType
=
pMsg
->
msgType
;
tmsg_t
msgType
=
pMsg
->
msgType
;
bool
isReq
=
msgType
&
1u
;
bool
isReq
=
msgType
&
1u
;
SMsgHandle
*
pHandle
=
&
pTrans
->
msgHandles
[
TMSG_INDEX
(
msgType
)];
SMsgHandle
*
pHandle
=
&
pTrans
->
msgHandles
[
TMSG_INDEX
(
msgType
)];
SMgmtWrapper
*
pWrapper
=
pHandle
->
pNdWrapper
;
SMgmtWrapper
*
pWrapper
=
NULL
;
switch
(
msgType
)
{
switch
(
msgType
)
{
case
TDMT_DND_SERVER_STATUS
:
case
TDMT_DND_SERVER_STATUS
:
...
@@ -171,7 +171,7 @@ static void dmProcessMsg(SDnode *pDnode, SRpcMsg *pMsg, SEpSet *pEpSet) {
...
@@ -171,7 +171,7 @@ static void dmProcessMsg(SDnode *pDnode, SRpcMsg *pMsg, SEpSet *pEpSet) {
return
;
return
;
}
}
if
(
p
Wrapper
==
NULL
)
{
if
(
p
Handle
->
defaultNtype
==
NODE_END
)
{
dError
(
"msg:%s not processed since no handle, handle:%p app:%p"
,
TMSG_INFO
(
msgType
),
pMsg
->
handle
,
pMsg
->
ahandle
);
dError
(
"msg:%s not processed since no handle, handle:%p app:%p"
,
TMSG_INFO
(
msgType
),
pMsg
->
handle
,
pMsg
->
ahandle
);
if
(
isReq
)
{
if
(
isReq
)
{
SRpcMsg
rspMsg
=
{
SRpcMsg
rspMsg
=
{
...
@@ -182,13 +182,14 @@ static void dmProcessMsg(SDnode *pDnode, SRpcMsg *pMsg, SEpSet *pEpSet) {
...
@@ -182,13 +182,14 @@ static void dmProcessMsg(SDnode *pDnode, SRpcMsg *pMsg, SEpSet *pEpSet) {
return
;
return
;
}
}
if
(
pHandle
->
pMndWrapper
!=
NULL
||
pHandle
->
pQndWrapper
!=
NULL
)
{
pWrapper
=
&
pDnode
->
wrappers
[
pHandle
->
defaultNtype
];
if
(
pHandle
->
needCheckVgId
)
{
SMsgHead
*
pHead
=
pMsg
->
pCont
;
SMsgHead
*
pHead
=
pMsg
->
pCont
;
int32_t
vgId
=
ntohl
(
pHead
->
vgId
);
int32_t
vgId
=
ntohl
(
pHead
->
vgId
);
if
(
vgId
==
QNODE_HANDLE
)
{
if
(
vgId
==
QNODE_HANDLE
)
{
pWrapper
=
pHandle
->
pQndWrapper
;
pWrapper
=
&
pDnode
->
wrappers
[
QNODE
]
;
}
else
if
(
vgId
==
MNODE_HANDLE
)
{
}
else
if
(
vgId
==
MNODE_HANDLE
)
{
pWrapper
=
pHandle
->
pMndWrapper
;
pWrapper
=
&
pDnode
->
wrappers
[
MNODE
]
;
}
else
{
}
else
{
}
}
}
}
...
@@ -202,34 +203,25 @@ static void dmProcessMsg(SDnode *pDnode, SRpcMsg *pMsg, SEpSet *pEpSet) {
...
@@ -202,34 +203,25 @@ static void dmProcessMsg(SDnode *pDnode, SRpcMsg *pMsg, SEpSet *pEpSet) {
int32_t
dmInitMsgHandle
(
SDnode
*
pDnode
)
{
int32_t
dmInitMsgHandle
(
SDnode
*
pDnode
)
{
SDnodeTrans
*
pTrans
=
&
pDnode
->
trans
;
SDnodeTrans
*
pTrans
=
&
pDnode
->
trans
;
for
(
EDndNodeType
ntype
=
DNODE
;
ntype
<
NODE_END
;
++
ntype
)
{
for
(
EDndNodeType
n
=
DNODE
;
n
<
NODE_END
;
++
n
)
{
SMgmtWrapper
*
pWrapper
=
&
pDnode
->
wrappers
[
ntype
];
SMgmtWrapper
*
pWrapper
=
&
pDnode
->
wrappers
[
n
];
for
(
int32_t
msgIndex
=
0
;
msgIndex
<
TDMT_MAX
;
++
msgIndex
)
{
for
(
int32_t
msgIndex
=
0
;
msgIndex
<
TDMT_MAX
;
++
msgIndex
)
{
NodeMsgFp
msgFp
=
pWrapper
->
msgFps
[
msgIndex
];
int8_t
vgId
=
pWrapper
->
msgVgIds
[
msgIndex
];
if
(
msgFp
==
NULL
)
continue
;
SMsgHandle
*
pHandle
=
&
pTrans
->
msgHandles
[
msgIndex
];
SMsgHandle
*
pHandle
=
&
pTrans
->
msgHandles
[
msgIndex
];
if
(
vgId
==
QNODE_HANDLE
)
{
pHandle
->
defaultNtype
=
NODE_END
;
if
(
pHandle
->
pQndWrapper
!=
NULL
)
{
dError
(
"msg:%s has multiple process nodes"
,
tMsgInfo
[
msgIndex
]);
return
-
1
;
}
pHandle
->
pQndWrapper
=
pWrapper
;
}
else
if
(
vgId
==
MNODE_HANDLE
)
{
if
(
pHandle
->
pMndWrapper
!=
NULL
)
{
dError
(
"msg:%s has multiple process nodes"
,
tMsgInfo
[
msgIndex
]);
return
-
1
;
}
}
pHandle
->
pMndWrapper
=
pWrapper
;
}
else
{
if
(
pHandle
->
pNdWrapper
!=
NULL
)
{
dError
(
"msg:%s has multiple process nodes"
,
tMsgInfo
[
msgIndex
]);
return
-
1
;
}
}
pHandle
->
pNdWrapper
=
pWrapper
;
for
(
EDndNodeType
ntype
=
DNODE
;
ntype
<
NODE_END
;
++
ntype
)
{
SMgmtWrapper
*
pWrapper
=
&
pDnode
->
wrappers
[
ntype
];
for
(
int32_t
msgIndex
=
0
;
msgIndex
<
TDMT_MAX
;
++
msgIndex
)
{
SMsgHandle
*
pHandle
=
&
pTrans
->
msgHandles
[
msgIndex
];
NodeMsgFp
msgFp
=
pWrapper
->
msgFps
[
msgIndex
];
bool
needCheckVgId
=
pWrapper
->
needCheckVgIds
[
msgIndex
];
if
(
msgFp
==
NULL
)
continue
;
if
(
needCheckVgId
)
pHandle
->
needCheckVgId
=
needCheckVgId
;
if
(
!
needCheckVgId
)
{
pHandle
->
defaultNtype
=
ntype
;
}
}
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录