Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
fc692411
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1185
Star
22015
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看板
提交
fc692411
编写于
5月 04, 2020
作者:
J
jtao1735
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
messages received are handled to different modules
上级
d58c42b4
变更
10
显示空白变更内容
内联
并排
Showing
10 changed file
with
207 addition
and
88 deletion
+207
-88
src/dnode/src/dnodeClient.c
src/dnode/src/dnodeClient.c
+0
-77
src/dnode/src/dnodeDnode.c
src/dnode/src/dnodeDnode.c
+165
-0
src/dnode/src/dnodeShell.c
src/dnode/src/dnodeShell.c
+37
-2
src/inc/dnode.h
src/inc/dnode.h
+1
-1
src/mnode/inc/mgmtServer.h
src/mnode/inc/mgmtServer.h
+0
-1
src/mnode/src/mgmtDnode.c
src/mnode/src/mgmtDnode.c
+1
-1
src/mnode/src/mgmtServer.c
src/mnode/src/mgmtServer.c
+1
-1
src/mnode/src/mgmtShell.c
src/mnode/src/mgmtShell.c
+0
-3
src/mnode/src/mgmtTable.c
src/mnode/src/mgmtTable.c
+1
-1
src/mnode/src/mgmtVgroup.c
src/mnode/src/mgmtVgroup.c
+1
-1
未找到文件。
src/dnode/src/dnodeClient.c
已删除
100644 → 0
浏览文件 @
d58c42b4
/*
* 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
*
* 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/>.
*/
#define _DEFAULT_SOURCE
#include "os.h"
#include "taosmsg.h"
#include "trpc.h"
#include "tutil.h"
#include "tglobal.h"
#include "dnode.h"
#include "dnodeLog.h"
#include "dnodeMgmt.h"
static
void
*
tsDnodeClientRpc
;
static
void
(
*
dnodeProcessDnodeRspFp
[
TSDB_MSG_TYPE_MAX
])(
SRpcMsg
*
rpcMsg
);
static
void
dnodeProcessRspFromDnode
(
SRpcMsg
*
pMsg
);
extern
void
dnodeUpdateIpSet
(
void
*
ahandle
,
SRpcIpSet
*
pIpSet
);
int32_t
dnodeInitClient
()
{
SRpcInit
rpcInit
;
memset
(
&
rpcInit
,
0
,
sizeof
(
rpcInit
));
rpcInit
.
label
=
"DND-C"
;
rpcInit
.
numOfThreads
=
1
;
rpcInit
.
cfp
=
dnodeProcessRspFromDnode
;
rpcInit
.
ufp
=
dnodeUpdateIpSet
;
rpcInit
.
sessions
=
100
;
rpcInit
.
connType
=
TAOS_CONN_CLIENT
;
rpcInit
.
idleTime
=
tsShellActivityTimer
*
2000
;
rpcInit
.
user
=
"t"
;
rpcInit
.
ckey
=
"key"
;
rpcInit
.
secret
=
"secret"
;
tsDnodeClientRpc
=
rpcOpen
(
&
rpcInit
);
if
(
tsDnodeClientRpc
==
NULL
)
{
dError
(
"failed to init mnode rpc client"
);
return
-
1
;
}
dPrint
(
"inter-dndoes rpc client is opened"
);
return
0
;
}
void
dnodeCleanupClient
()
{
if
(
tsDnodeClientRpc
)
{
rpcClose
(
tsDnodeClientRpc
);
tsDnodeClientRpc
=
NULL
;
dPrint
(
"inter-dnodes rpc client is closed"
);
}
}
static
void
dnodeProcessRspFromDnode
(
SRpcMsg
*
pMsg
)
{
if
(
dnodeProcessDnodeRspFp
[
pMsg
->
msgType
])
{
(
*
dnodeProcessDnodeRspFp
[
pMsg
->
msgType
])(
pMsg
);
}
else
{
dError
(
"%s is not processed"
,
taosMsg
[
pMsg
->
msgType
]);
}
rpcFreeCont
(
pMsg
->
pCont
);
}
void
dnodeAddClientRspHandle
(
uint8_t
msgType
,
void
(
*
fp
)(
SRpcMsg
*
rpcMsg
))
{
dnodeProcessDnodeRspFp
[
msgType
]
=
fp
;
}
void
dnodeSendMsgToDnode
(
SRpcIpSet
*
ipSet
,
SRpcMsg
*
rpcMsg
)
{
rpcSendRequest
(
tsDnodeClientRpc
,
ipSet
,
rpcMsg
);
}
src/dnode/src/dnode
Server
.c
→
src/dnode/src/dnode
Dnode
.c
浏览文件 @
fc692411
...
...
@@ -13,6 +13,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* this file is mainly responsible for the communication between DNODEs. Each
* dnode works as both server and client. Dnode may send status, grant, config
* messages to mnode, mnode may send create/alter/drop table/vnode messages
* to dnode. All theses messages are handled from here
*/
#include "os.h"
#include "taosmsg.h"
#include "tglobal.h"
...
...
@@ -21,20 +27,31 @@
#include "dnodeLog.h"
#include "dnodeMgmt.h"
#include "dnodeWrite.h"
#include "mnode.h"
static
void
(
*
dnodeProcessMgmtMsgFp
[
TSDB_MSG_TYPE_MAX
])(
SRpcMsg
*
);
extern
void
dnodeUpdateIpSet
(
void
*
ahandle
,
SRpcIpSet
*
pIpSet
);
static
void
(
*
dnodeProcessReqMsgFp
[
TSDB_MSG_TYPE_MAX
])(
SRpcMsg
*
);
static
void
dnodeProcessReqMsgFromDnode
(
SRpcMsg
*
pMsg
);
static
void
(
*
dnodeProcessRspMsgFp
[
TSDB_MSG_TYPE_MAX
])(
SRpcMsg
*
rpcMsg
);
static
void
dnodeProcessRspFromDnode
(
SRpcMsg
*
pMsg
);
static
void
*
tsDnodeServerRpc
=
NULL
;
static
void
*
tsDnodeClientRpc
=
NULL
;
int32_t
dnodeInitServer
()
{
dnodeProcessMgmtMsgFp
[
TSDB_MSG_TYPE_MD_CREATE_TABLE
]
=
dnodeWrite
;
dnodeProcessMgmtMsgFp
[
TSDB_MSG_TYPE_MD_DROP_TABLE
]
=
dnodeWrite
;
dnodeProcessMgmtMsgFp
[
TSDB_MSG_TYPE_MD_ALTER_TABLE
]
=
dnodeWrite
;
dnodeProcessMgmtMsgFp
[
TSDB_MSG_TYPE_MD_DROP_STABLE
]
=
dnodeWrite
;
dnodeProcessMgmtMsgFp
[
TSDB_MSG_TYPE_MD_CREATE_VNODE
]
=
dnodeMgmt
;
dnodeProcessMgmtMsgFp
[
TSDB_MSG_TYPE_MD_DROP_VNODE
]
=
dnodeMgmt
;
dnodeProcessMgmtMsgFp
[
TSDB_MSG_TYPE_MD_ALTER_STREAM
]
=
dnodeMgmt
;
dnodeProcessMgmtMsgFp
[
TSDB_MSG_TYPE_MD_CONFIG_DNODE
]
=
dnodeMgmt
;
dnodeProcessReqMsgFp
[
TSDB_MSG_TYPE_MD_CREATE_TABLE
]
=
dnodeWrite
;
dnodeProcessReqMsgFp
[
TSDB_MSG_TYPE_MD_DROP_TABLE
]
=
dnodeWrite
;
dnodeProcessReqMsgFp
[
TSDB_MSG_TYPE_MD_ALTER_TABLE
]
=
dnodeWrite
;
dnodeProcessReqMsgFp
[
TSDB_MSG_TYPE_MD_DROP_STABLE
]
=
dnodeWrite
;
dnodeProcessReqMsgFp
[
TSDB_MSG_TYPE_MD_CREATE_VNODE
]
=
dnodeMgmt
;
dnodeProcessReqMsgFp
[
TSDB_MSG_TYPE_MD_DROP_VNODE
]
=
dnodeMgmt
;
dnodeProcessReqMsgFp
[
TSDB_MSG_TYPE_MD_ALTER_STREAM
]
=
dnodeMgmt
;
dnodeProcessReqMsgFp
[
TSDB_MSG_TYPE_MD_CONFIG_DNODE
]
=
dnodeMgmt
;
dnodeProcessReqMsgFp
[
TSDB_MSG_TYPE_DM_CONFIG_TABLE
]
=
mgmtProcessReqMsgFromDnode
;
dnodeProcessReqMsgFp
[
TSDB_MSG_TYPE_DM_CONFIG_VNODE
]
=
mgmtProcessReqMsgFromDnode
;
dnodeProcessReqMsgFp
[
TSDB_MSG_TYPE_DM_GRANT
]
=
mgmtProcessReqMsgFromDnode
;
dnodeProcessReqMsgFp
[
TSDB_MSG_TYPE_DM_STATUS
]
=
mgmtProcessReqMsgFromDnode
;
SRpcInit
rpcInit
;
memset
(
&
rpcInit
,
0
,
sizeof
(
rpcInit
));
...
...
@@ -64,8 +81,6 @@ void dnodeCleanupServer() {
}
}
void
mgmtProcessReqMsgFromDnode
(
SRpcMsg
*
rpcMsg
);
static
void
dnodeProcessReqMsgFromDnode
(
SRpcMsg
*
pMsg
)
{
SRpcMsg
rspMsg
;
rspMsg
.
handle
=
pMsg
->
handle
;
...
...
@@ -76,7 +91,7 @@ static void dnodeProcessReqMsgFromDnode(SRpcMsg *pMsg) {
rspMsg
.
code
=
TSDB_CODE_NOT_READY
;
rpcSendResponse
(
&
rspMsg
);
rpcFreeCont
(
pMsg
->
pCont
);
dTrace
(
"
thandle:%p, query msg is ignored since dnode not running"
,
pMsg
->
handle
);
dTrace
(
"
RPC %p, msg:%s is ignored since dnode not running"
,
pMsg
->
handle
,
taosMsg
[
pMsg
->
msgType
]);
return
;
}
...
...
@@ -86,10 +101,65 @@ static void dnodeProcessReqMsgFromDnode(SRpcMsg *pMsg) {
return
;
}
if
(
dnodeProcessMgmtMsgFp
[
pMsg
->
msgType
])
{
(
*
dnodeProcessMgmtMsgFp
[
pMsg
->
msgType
])(
pMsg
);
if
(
dnodeProcessReqMsgFp
[
pMsg
->
msgType
])
{
(
*
dnodeProcessReqMsgFp
[
pMsg
->
msgType
])(
pMsg
);
}
else
{
rspMsg
.
code
=
TSDB_CODE_MSG_NOT_PROCESSED
;
rpcSendResponse
(
&
rspMsg
);
rpcFreeCont
(
pMsg
->
pCont
);
dTrace
(
"RPC %p, message:%s not processed"
,
pMsg
->
handle
,
taosMsg
[
pMsg
->
msgType
]);
return
;
}
}
int32_t
dnodeInitClient
()
{
SRpcInit
rpcInit
;
memset
(
&
rpcInit
,
0
,
sizeof
(
rpcInit
));
rpcInit
.
label
=
"DND-C"
;
rpcInit
.
numOfThreads
=
1
;
rpcInit
.
cfp
=
dnodeProcessRspFromDnode
;
rpcInit
.
ufp
=
dnodeUpdateIpSet
;
rpcInit
.
sessions
=
100
;
rpcInit
.
connType
=
TAOS_CONN_CLIENT
;
rpcInit
.
idleTime
=
tsShellActivityTimer
*
2000
;
rpcInit
.
user
=
"t"
;
rpcInit
.
ckey
=
"key"
;
rpcInit
.
secret
=
"secret"
;
tsDnodeClientRpc
=
rpcOpen
(
&
rpcInit
);
if
(
tsDnodeClientRpc
==
NULL
)
{
dError
(
"failed to init mnode rpc client"
);
return
-
1
;
}
dPrint
(
"inter-dndoes rpc client is opened"
);
return
0
;
}
void
dnodeCleanupClient
()
{
if
(
tsDnodeClientRpc
)
{
rpcClose
(
tsDnodeClientRpc
);
tsDnodeClientRpc
=
NULL
;
dPrint
(
"inter-dnodes rpc client is closed"
);
}
}
static
void
dnodeProcessRspFromDnode
(
SRpcMsg
*
pMsg
)
{
if
(
dnodeProcessRspMsgFp
[
pMsg
->
msgType
])
{
(
*
dnodeProcessRspMsgFp
[
pMsg
->
msgType
])(
pMsg
);
}
else
{
mgmtProcessReqMsgFromDnode
(
pMsg
);
dError
(
"RPC %p, msg:%s is not processed"
,
pMsg
->
handle
,
taosMsg
[
pMsg
->
msgType
]);
}
rpcFreeCont
(
pMsg
->
pCont
);
}
void
dnodeAddClientRspHandle
(
uint8_t
msgType
,
void
(
*
fp
)(
SRpcMsg
*
rpcMsg
))
{
dnodeProcessRspMsgFp
[
msgType
]
=
fp
;
}
void
dnodeSendMsgToDnode
(
SRpcIpSet
*
ipSet
,
SRpcMsg
*
rpcMsg
)
{
rpcSendRequest
(
tsDnodeClientRpc
,
ipSet
,
rpcMsg
);
}
src/dnode/src/dnodeShell.c
浏览文件 @
fc692411
...
...
@@ -41,6 +41,37 @@ int32_t dnodeInitShell() {
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_QUERY
]
=
dnodeRead
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_FETCH
]
=
dnodeRead
;
// the following message shall be treated as mnode write
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_CM_CONNECT
]
=
mgmtProcessMsgFromShell
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_CM_CREATE_ACCT
]
=
mgmtProcessMsgFromShell
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_CM_ALTER_ACCT
]
=
mgmtProcessMsgFromShell
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_CM_DROP_ACCT
]
=
mgmtProcessMsgFromShell
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_CM_CREATE_USER
]
=
mgmtProcessMsgFromShell
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_CM_ALTER_USER
]
=
mgmtProcessMsgFromShell
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_CM_DROP_USER
]
=
mgmtProcessMsgFromShell
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_CM_CREATE_DNODE
]
=
mgmtProcessMsgFromShell
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_CM_DROP_DNODE
]
=
mgmtProcessMsgFromShell
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_CM_CREATE_DB
]
=
mgmtProcessMsgFromShell
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_CM_DROP_DB
]
=
mgmtProcessMsgFromShell
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_CM_ALTER_DB
]
=
mgmtProcessMsgFromShell
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_CM_CREATE_TABLE
]
=
mgmtProcessMsgFromShell
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_CM_DROP_TABLE
]
=
mgmtProcessMsgFromShell
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_CM_ALTER_TABLE
]
=
mgmtProcessMsgFromShell
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_CM_ALTER_STREAM
]
=
mgmtProcessMsgFromShell
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_CM_KILL_QUERY
]
=
mgmtProcessMsgFromShell
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_CM_KILL_STREAM
]
=
mgmtProcessMsgFromShell
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_CM_KILL_CONN
]
=
mgmtProcessMsgFromShell
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_CM_HEARTBEAT
]
=
mgmtProcessMsgFromShell
;
// the following message shall be treated as mnode query
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_CM_USE_DB
]
=
mgmtProcessMsgFromShell
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_CM_TABLE_META
]
=
mgmtProcessMsgFromShell
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_CM_STABLE_VGROUP
]
=
mgmtProcessMsgFromShell
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_CM_TABLES_META
]
=
mgmtProcessMsgFromShell
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_CM_SHOW
]
=
mgmtProcessMsgFromShell
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_CM_RETRIEVE
]
=
mgmtProcessMsgFromShell
;
dnodeProcessShellMsgFp
[
TSDB_MSG_TYPE_CM_CONFIG_DNODE
]
=
mgmtProcessMsgFromShell
;
int32_t
numOfThreads
=
tsNumOfCores
*
tsNumOfThreadsPerCore
;
numOfThreads
=
(
int32_t
)
((
1
.
0
-
tsRatioOfQueryThreads
)
*
numOfThreads
/
2
.
0
);
if
(
numOfThreads
<
1
)
{
...
...
@@ -82,7 +113,7 @@ void dnodeProcessMsgFromShell(SRpcMsg *pMsg) {
rpcMsg
.
contLen
=
0
;
if
(
dnodeGetRunStatus
()
!=
TSDB_DNODE_RUN_STATUS_RUNING
)
{
dError
(
"RPC %p, shell msg
is ignored since dnode not running"
,
pMsg
->
handle
);
dError
(
"RPC %p, shell msg
:%s is ignored since dnode not running"
,
pMsg
->
handle
,
taosMsg
[
pMsg
->
msgType
]
);
rpcMsg
.
code
=
TSDB_CODE_NOT_READY
;
rpcSendResponse
(
&
rpcMsg
);
rpcFreeCont
(
pMsg
->
pCont
);
...
...
@@ -98,7 +129,11 @@ void dnodeProcessMsgFromShell(SRpcMsg *pMsg) {
if
(
dnodeProcessShellMsgFp
[
pMsg
->
msgType
]
)
{
(
*
dnodeProcessShellMsgFp
[
pMsg
->
msgType
])(
pMsg
);
}
else
{
mgmtProcessMsgFromShell
(
pMsg
);
dError
(
"RPC %p, shell msg:%s is not processed"
,
pMsg
->
handle
,
taosMsg
[
pMsg
->
msgType
]);
rpcMsg
.
code
=
TSDB_CODE_MSG_NOT_PROCESSED
;
rpcSendResponse
(
&
rpcMsg
);
rpcFreeCont
(
pMsg
->
pCont
);
return
;
}
}
...
...
src/inc/dnode.h
浏览文件 @
fc692411
...
...
@@ -50,7 +50,7 @@ void * dnodeGetMnodeInfos();
int32_t
dnodeGetDnodeId
();
void
dnodeAddClientRspHandle
(
uint8_t
msgType
,
void
(
*
fp
)(
SRpcMsg
*
rpcMsg
));
void
mgmtAddD
ServerMsgHandle
(
uint8_t
msgType
,
void
(
*
fp
)(
SRpcMsg
*
rpcMsg
));
void
dnodeAdd
ServerMsgHandle
(
uint8_t
msgType
,
void
(
*
fp
)(
SRpcMsg
*
rpcMsg
));
void
dnodeSendMsgToDnode
(
SRpcIpSet
*
ipSet
,
SRpcMsg
*
rpcMsg
);
#ifdef __cplusplus
...
...
src/mnode/inc/mgmtServer.h
浏览文件 @
fc692411
...
...
@@ -22,7 +22,6 @@ extern "C" {
int32_t
mgmtInitServer
();
void
mgmtCleanupServer
();
void
mgmtAddDServerMsgHandle
(
uint8_t
msgType
,
void
(
*
fp
)(
SRpcMsg
*
rpcMsg
));
#ifdef __cplusplus
}
...
...
src/mnode/src/mgmtDnode.c
浏览文件 @
fc692411
...
...
@@ -151,7 +151,7 @@ int32_t mgmtInitDnodes() {
mgmtAddShellMsgHandle
(
TSDB_MSG_TYPE_CM_DROP_DNODE
,
mgmtProcessDropDnodeMsg
);
mgmtAddShellMsgHandle
(
TSDB_MSG_TYPE_CM_CONFIG_DNODE
,
mgmtProcessCfgDnodeMsg
);
dnodeAddClientRspHandle
(
TSDB_MSG_TYPE_MD_CONFIG_DNODE_RSP
,
mgmtProcessCfgDnodeMsgRsp
);
mgmtAddD
ServerMsgHandle
(
TSDB_MSG_TYPE_DM_STATUS
,
mgmtProcessDnodeStatusMsg
);
dnodeAdd
ServerMsgHandle
(
TSDB_MSG_TYPE_DM_STATUS
,
mgmtProcessDnodeStatusMsg
);
mgmtAddShellShowMetaHandle
(
TSDB_MGMT_TABLE_MODULE
,
mgmtGetModuleMeta
);
mgmtAddShellShowRetrieveHandle
(
TSDB_MGMT_TABLE_MODULE
,
mgmtRetrieveModules
);
mgmtAddShellShowMetaHandle
(
TSDB_MGMT_TABLE_CONFIGS
,
mgmtGetConfigMeta
);
...
...
src/mnode/src/mgmtServer.c
浏览文件 @
fc692411
...
...
@@ -52,7 +52,7 @@ void mgmtCleanupServer() {
}
}
void
mgmtAddD
ServerMsgHandle
(
uint8_t
msgType
,
void
(
*
fp
)(
SRpcMsg
*
rpcMsg
))
{
void
dnodeAdd
ServerMsgHandle
(
uint8_t
msgType
,
void
(
*
fp
)(
SRpcMsg
*
rpcMsg
))
{
mgmtProcessDnodeMsgFp
[
msgType
]
=
fp
;
}
...
...
src/mnode/src/mgmtShell.c
浏览文件 @
fc692411
...
...
@@ -43,7 +43,6 @@ typedef int32_t (*SShowRetrieveFp)(SShowObj *pShow, char *data, int32_t rows, vo
//static int mgmtShellRetriveAuth(char *user, char *spi, char *encrypt, char *secret, char *ckey);
static
bool
mgmtCheckMsgReadOnly
(
SQueuedMsg
*
pMsg
);
//static void mgmtProcessMsgFromShell(SRpcMsg *pMsg);
static
void
mgmtProcessUnSupportMsg
(
SRpcMsg
*
rpcMsg
);
static
void
mgmtProcessShowMsg
(
SQueuedMsg
*
queuedMsg
);
static
void
mgmtProcessRetrieveMsg
(
SQueuedMsg
*
queuedMsg
);
...
...
@@ -52,7 +51,6 @@ static void mgmtProcessConnectMsg(SQueuedMsg *queuedMsg);
static
void
mgmtProcessUseMsg
(
SQueuedMsg
*
queuedMsg
);
void
*
tsMgmtTmr
;
//static void *tsMgmtShellRpc = NULL;
static
void
*
tsMgmtTranQhandle
=
NULL
;
static
void
(
*
tsMgmtProcessShellMsgFp
[
TSDB_MSG_TYPE_MAX
])(
SQueuedMsg
*
)
=
{
0
};
static
void
*
tsQhandleCache
=
NULL
;
...
...
@@ -121,7 +119,6 @@ void mgmtDealyedAddToShellQueue(SQueuedMsg *queuedMsg) {
}
void
mgmtProcessMsgFromShell
(
SRpcMsg
*
rpcMsg
)
{
assert
(
rpcMsg
);
if
(
rpcMsg
->
pCont
==
NULL
)
{
mgmtSendSimpleResp
(
rpcMsg
->
handle
,
TSDB_CODE_INVALID_MSG_LEN
);
...
...
src/mnode/src/mgmtTable.c
浏览文件 @
fc692411
...
...
@@ -542,7 +542,7 @@ int32_t mgmtInitTables() {
dnodeAddClientRspHandle
(
TSDB_MSG_TYPE_MD_DROP_STABLE_RSP
,
mgmtProcessDropSuperTableRsp
);
dnodeAddClientRspHandle
(
TSDB_MSG_TYPE_MD_ALTER_TABLE_RSP
,
mgmtProcessAlterTableRsp
);
mgmtAddD
ServerMsgHandle
(
TSDB_MSG_TYPE_DM_CONFIG_TABLE
,
mgmtProcessTableCfgMsg
);
dnodeAdd
ServerMsgHandle
(
TSDB_MSG_TYPE_DM_CONFIG_TABLE
,
mgmtProcessTableCfgMsg
);
mgmtAddShellShowMetaHandle
(
TSDB_MGMT_TABLE_TABLE
,
mgmtGetShowTableMeta
);
mgmtAddShellShowRetrieveHandle
(
TSDB_MGMT_TABLE_TABLE
,
mgmtRetrieveShowTables
);
...
...
src/mnode/src/mgmtVgroup.c
浏览文件 @
fc692411
...
...
@@ -221,7 +221,7 @@ int32_t mgmtInitVgroups() {
mgmtAddShellShowRetrieveHandle
(
TSDB_MGMT_TABLE_VGROUP
,
mgmtRetrieveVgroups
);
dnodeAddClientRspHandle
(
TSDB_MSG_TYPE_MD_CREATE_VNODE_RSP
,
mgmtProcessCreateVnodeRsp
);
dnodeAddClientRspHandle
(
TSDB_MSG_TYPE_MD_DROP_VNODE_RSP
,
mgmtProcessDropVnodeRsp
);
mgmtAddD
ServerMsgHandle
(
TSDB_MSG_TYPE_DM_CONFIG_VNODE
,
mgmtProcessVnodeCfgMsg
);
dnodeAdd
ServerMsgHandle
(
TSDB_MSG_TYPE_DM_CONFIG_VNODE
,
mgmtProcessVnodeCfgMsg
);
mTrace
(
"table:vgroups is created"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录