Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
68b9608f
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
未验证
提交
68b9608f
编写于
6月 02, 2022
作者:
S
Shengliang Guan
提交者:
GitHub
6月 02, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #13428 from taosdata/fix/mnode
refactor: adjust some logs
上级
3eb1d488
46772d32
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
115 addition
and
119 deletion
+115
-119
include/common/tmsgdef.h
include/common/tmsgdef.h
+84
-88
source/dnode/mgmt/mgmt_mnode/src/mmHandle.c
source/dnode/mgmt/mgmt_mnode/src/mmHandle.c
+2
-2
source/dnode/mgmt/mgmt_vnode/src/vmFile.c
source/dnode/mgmt/mgmt_vnode/src/vmFile.c
+1
-1
source/dnode/mgmt/mgmt_vnode/src/vmHandle.c
source/dnode/mgmt/mgmt_vnode/src/vmHandle.c
+2
-2
source/dnode/mgmt/mgmt_vnode/src/vmInt.c
source/dnode/mgmt/mgmt_vnode/src/vmInt.c
+2
-2
source/dnode/mgmt/mgmt_vnode/src/vmWorker.c
source/dnode/mgmt/mgmt_vnode/src/vmWorker.c
+12
-11
source/dnode/mgmt/node_mgmt/src/dmMgmt.c
source/dnode/mgmt/node_mgmt/src/dmMgmt.c
+3
-3
source/dnode/mgmt/node_mgmt/src/dmTransport.c
source/dnode/mgmt/node_mgmt/src/dmTransport.c
+1
-1
source/dnode/mgmt/test/mnode/dmnode.cpp
source/dnode/mgmt/test/mnode/dmnode.cpp
+4
-4
source/dnode/mnode/impl/src/mndMnode.c
source/dnode/mnode/impl/src/mndMnode.c
+4
-4
tests/script/tsim/db/alter_replica_13.sim
tests/script/tsim/db/alter_replica_13.sim
+0
-1
未找到文件。
include/common/tmsgdef.h
浏览文件 @
68b9608f
...
...
@@ -70,106 +70,102 @@ enum {
// Requests handled by DNODE
TD_NEW_MSG_SEG
(
TDMT_DND_MSG
)
TD_DEF_MSG_TYPE
(
TDMT_DND_CREATE_MNODE
,
"dnode-create-mnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_DND_ALTER_MNODE
,
"dnode-alter-mnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_DND_DROP_MNODE
,
"dnode-drop-mnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_DND_CREATE_QNODE
,
"dnode-create-qnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_DND_ALTER_QNODE
,
"dnode-alter-qnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_DND_DROP_QNODE
,
"dnode-drop-qnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_DND_CREATE_SNODE
,
"dnode-create-snode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_DND_ALTER_SNODE
,
"dnode-alter-snode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_DND_DROP_SNODE
,
"dnode-drop-snode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_DND_CREATE_BNODE
,
"dnode-create-bnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_DND_ALTER_BNODE
,
"dnode-alter-bnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_DND_DROP_BNODE
,
"dnode-drop-bnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_DND_CREATE_VNODE
,
"
dnode-
create-vnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_DND_DROP_VNODE
,
"d
node-d
rop-vnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_DND_
CONFIG_DNODE
,
"dnode-config-dnode
"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_DND_
SERVER_STATUS
,
"dnode-server-status
"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_DND_
NET_TEST
,
"dnode-net-test
"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_DND_CREATE_VNODE
,
"create-vnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_DND_DROP_VNODE
,
"drop-vnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_DND_
SERVER_STATUS
,
"server-status
"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_DND_
NET_TEST
,
"net-test
"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_DND_
CONFIG_DNODE
,
"config-dnode
"
,
NULL
,
NULL
)
// Requests handled by MNODE
TD_NEW_MSG_SEG
(
TDMT_MND_MSG
)
TD_DEF_MSG_TYPE
(
TDMT_MND_CONNECT
,
"
mnode-
connect"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_CREATE_ACCT
,
"
mnode-
create-acct"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_ALTER_ACCT
,
"
mnode-
alter-acct"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_DROP_ACCT
,
"
mnode-
drop-acct"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_CREATE_USER
,
"
mnode-
create-user"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_ALTER_USER
,
"
mnode-
alter-user"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_DROP_USER
,
"
mnode-
drop-user"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_GET_USER_AUTH
,
"
mnode-
get-user-auth"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_CREATE_DNODE
,
"
mnode-
create-dnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_CONFIG_DNODE
,
"
mnode-
config-dnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_ALTER_DNODE
,
"
mnode-
alter-dnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_DROP_DNODE
,
"
mnode-
drop-dnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_CREATE_MNODE
,
"
mnode-
create-mnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_ALTER_MNODE
,
"
mnode-
alter-mnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_DROP_MNODE
,
"
mnode-
drop-mnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_CREATE_QNODE
,
"
mnode-
create-qnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_ALTER_QNODE
,
"
mnode-
alter-qnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_DROP_QNODE
,
"
mnode-
drop-qnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_CREATE_SNODE
,
"
mnode-
create-snode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_ALTER_SNODE
,
"
mnode-
alter-snode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_DROP_SNODE
,
"
mnode-
drop-snode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_CREATE_BNODE
,
"
mnode-
create-bnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_ALTER_BNODE
,
"
mnode-
alter-bnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_DROP_BNODE
,
"
mnode-
drop-bnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_CREATE_DB
,
"
mnode-
create-db"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_DROP_DB
,
"
mnode-
drop-db"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_USE_DB
,
"
mnode-
use-db"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_ALTER_DB
,
"
mnode-
alter-db"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_SYNC_DB
,
"
mnode-
sync-db"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_COMPACT_DB
,
"
mnode-
compact-db"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_CREATE_FUNC
,
"
mnode-
create-func"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_RETRIEVE_FUNC
,
"
mnode-
retrieve-func"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_DROP_FUNC
,
"
mnode-
drop-func"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_CREATE_STB
,
"
mnode-
create-stb"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_ALTER_STB
,
"
mnode-
alter-stb"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_DROP_STB
,
"
mnode-
drop-stb"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_CREATE_SMA
,
"
mnode-
create-sma"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_DROP_SMA
,
"
mnode-
drop-sma"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_TABLE_META
,
"
mnode-
table-meta"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_VGROUP_LIST
,
"
mnode-
vgroup-list"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_QNODE_LIST
,
"
mnode-
qnode-list"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_KILL_QUERY
,
"
mnode-
kill-query"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_KILL_CONN
,
"
mnode-
kill-conn"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_HEARTBEAT
,
"
mnode-
heartbeat"
,
SClientHbBatchReq
,
SClientHbBatchRsp
)
TD_DEF_MSG_TYPE
(
TDMT_MND_SHOW
,
"
mnode-
show"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_SYSTABLE_RETRIEVE
,
"
mnode-
systable-retrieve"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_STATUS
,
"
mnode-
status"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_TRANS_TIMER
,
"
mnode-
trans-tmr"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_KILL_TRANS
,
"
mnode-
kill-trans"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_TELEM_TIMER
,
"
mnode-
telem-tmr"
,
SMTimerReq
,
SMTimerReq
)
TD_DEF_MSG_TYPE
(
TDMT_MND_GRANT
,
"
mnode-
grant"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_AUTH
,
"
mnode-
auth"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_CREATE_TOPIC
,
"
mnode-
create-topic"
,
SMCreateTopicReq
,
SMCreateTopicRsp
)
TD_DEF_MSG_TYPE
(
TDMT_MND_ALTER_TOPIC
,
"
mnode-
alter-topic"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_DROP_TOPIC
,
"
mnode-
drop-topic"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_SUBSCRIBE
,
"
mnode-
subscribe"
,
SCMSubscribeReq
,
SCMSubscribeRsp
)
TD_DEF_MSG_TYPE
(
TDMT_MND_MQ_ASK_EP
,
"m
node-m
q-ask-ep"
,
SMqAskEpReq
,
SMqAskEpRsp
)
TD_DEF_MSG_TYPE
(
TDMT_MND_MQ_TIMER
,
"m
node-m
q-tmr"
,
SMTimerReq
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_MQ_CONSUMER_LOST
,
"m
node-m
q-consumer-lost"
,
SMqConsumerLostMsg
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_MQ_CONSUMER_RECOVER
,
"m
node-m
q-consumer-recover"
,
SMqConsumerRecoverMsg
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_MQ_DO_REBALANCE
,
"m
node-m
q-do-rebalance"
,
SMqDoRebalanceMsg
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_MQ_DROP_CGROUP
,
"m
node-m
q-drop-cgroup"
,
SMqDropCGroupReq
,
SMqDropCGroupRsp
)
TD_DEF_MSG_TYPE
(
TDMT_MND_MQ_COMMIT_OFFSET
,
"m
node-m
q-commit-offset"
,
SMqCMCommitOffsetReq
,
SMqCMCommitOffsetRsp
)
TD_DEF_MSG_TYPE
(
TDMT_MND_CREATE_STREAM
,
"
mnode-
create-stream"
,
SCMCreateStreamReq
,
SCMCreateStreamRsp
)
TD_DEF_MSG_TYPE
(
TDMT_MND_ALTER_STREAM
,
"
mnode-
alter-stream"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_DROP_STREAM
,
"
mnode-
drop-stream"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_CREATE_INDEX
,
"
mnode-
create-index"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_DROP_INDEX
,
"
mnode-
drop-index"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_GET_DB_CFG
,
"
mnode-
get-db-cfg"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_GET_INDEX
,
"
mnode-
get-index"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_APPLY_MSG
,
"
mnode-
apply-msg"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_CONNECT
,
"connect"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_CREATE_ACCT
,
"create-acct"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_ALTER_ACCT
,
"alter-acct"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_DROP_ACCT
,
"drop-acct"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_CREATE_USER
,
"create-user"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_ALTER_USER
,
"alter-user"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_DROP_USER
,
"drop-user"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_GET_USER_AUTH
,
"get-user-auth"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_CREATE_DNODE
,
"create-dnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_CONFIG_DNODE
,
"config-dnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_ALTER_DNODE
,
"alter-dnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_DROP_DNODE
,
"drop-dnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_CREATE_MNODE
,
"create-mnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_ALTER_MNODE
,
"alter-mnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_DROP_MNODE
,
"drop-mnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_CREATE_QNODE
,
"create-qnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_ALTER_QNODE
,
"alter-qnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_DROP_QNODE
,
"drop-qnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_CREATE_SNODE
,
"create-snode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_ALTER_SNODE
,
"alter-snode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_DROP_SNODE
,
"drop-snode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_CREATE_BNODE
,
"create-bnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_ALTER_BNODE
,
"alter-bnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_DROP_BNODE
,
"drop-bnode"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_CREATE_DB
,
"create-db"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_DROP_DB
,
"drop-db"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_USE_DB
,
"use-db"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_ALTER_DB
,
"alter-db"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_SYNC_DB
,
"sync-db"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_COMPACT_DB
,
"compact-db"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_CREATE_FUNC
,
"create-func"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_RETRIEVE_FUNC
,
"retrieve-func"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_DROP_FUNC
,
"drop-func"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_CREATE_STB
,
"create-stb"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_ALTER_STB
,
"alter-stb"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_DROP_STB
,
"drop-stb"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_CREATE_SMA
,
"create-sma"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_DROP_SMA
,
"drop-sma"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_TABLE_META
,
"table-meta"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_VGROUP_LIST
,
"vgroup-list"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_QNODE_LIST
,
"qnode-list"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_KILL_QUERY
,
"kill-query"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_KILL_CONN
,
"kill-conn"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_HEARTBEAT
,
"heartbeat"
,
SClientHbBatchReq
,
SClientHbBatchRsp
)
TD_DEF_MSG_TYPE
(
TDMT_MND_SHOW
,
"show"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_SYSTABLE_RETRIEVE
,
"systable-retrieve"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_STATUS
,
"status"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_TRANS_TIMER
,
"trans-tmr"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_KILL_TRANS
,
"kill-trans"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_TELEM_TIMER
,
"telem-tmr"
,
SMTimerReq
,
SMTimerReq
)
TD_DEF_MSG_TYPE
(
TDMT_MND_GRANT
,
"grant"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_AUTH
,
"auth"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_CREATE_TOPIC
,
"create-topic"
,
SMCreateTopicReq
,
SMCreateTopicRsp
)
TD_DEF_MSG_TYPE
(
TDMT_MND_ALTER_TOPIC
,
"alter-topic"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_DROP_TOPIC
,
"drop-topic"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_SUBSCRIBE
,
"subscribe"
,
SCMSubscribeReq
,
SCMSubscribeRsp
)
TD_DEF_MSG_TYPE
(
TDMT_MND_MQ_ASK_EP
,
"mq-ask-ep"
,
SMqAskEpReq
,
SMqAskEpRsp
)
TD_DEF_MSG_TYPE
(
TDMT_MND_MQ_TIMER
,
"mq-tmr"
,
SMTimerReq
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_MQ_CONSUMER_LOST
,
"mq-consumer-lost"
,
SMqConsumerLostMsg
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_MQ_CONSUMER_RECOVER
,
"mq-consumer-recover"
,
SMqConsumerRecoverMsg
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_MQ_DO_REBALANCE
,
"mq-do-rebalance"
,
SMqDoRebalanceMsg
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_MQ_DROP_CGROUP
,
"mq-drop-cgroup"
,
SMqDropCGroupReq
,
SMqDropCGroupRsp
)
TD_DEF_MSG_TYPE
(
TDMT_MND_MQ_COMMIT_OFFSET
,
"mq-commit-offset"
,
SMqCMCommitOffsetReq
,
SMqCMCommitOffsetRsp
)
TD_DEF_MSG_TYPE
(
TDMT_MND_CREATE_STREAM
,
"create-stream"
,
SCMCreateStreamReq
,
SCMCreateStreamRsp
)
TD_DEF_MSG_TYPE
(
TDMT_MND_ALTER_STREAM
,
"alter-stream"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_DROP_STREAM
,
"drop-stream"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_CREATE_INDEX
,
"create-index"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_DROP_INDEX
,
"drop-index"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_GET_DB_CFG
,
"get-db-cfg"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_GET_INDEX
,
"get-index"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_MND_APPLY_MSG
,
"apply-msg"
,
NULL
,
NULL
)
// Requests handled by VNODE
TD_NEW_MSG_SEG
(
TDMT_VND_MSG
)
TD_DEF_MSG_TYPE
(
TDMT_VND_SUBMIT
,
"
vnode-
submit"
,
SSubmitReq
,
SSubmitRsp
)
TD_DEF_MSG_TYPE
(
TDMT_VND_QUERY
,
"
vnode-
query"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_VND_FETCH
,
"
vnode-
fetch"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_VND_CREATE_TABLE
,
"
vnode-
create-table"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_VND_ALTER_TABLE
,
"
vnode-
alter-table"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_VND_DROP_TABLE
,
"
vnode-
drop-table"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_VND_UPDATE_TAG_VAL
,
"
vnode-
update-tag-val"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_VND_SUBMIT
,
"submit"
,
SSubmitReq
,
SSubmitRsp
)
TD_DEF_MSG_TYPE
(
TDMT_VND_QUERY
,
"query"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_VND_FETCH
,
"fetch"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_VND_CREATE_TABLE
,
"create-table"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_VND_ALTER_TABLE
,
"alter-table"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_VND_DROP_TABLE
,
"drop-table"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_VND_UPDATE_TAG_VAL
,
"update-tag-val"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_VND_TABLE_META
,
"vnode-table-meta"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_VND_TABLES_META
,
"vnode-tables-meta"
,
NULL
,
NULL
)
TD_DEF_MSG_TYPE
(
TDMT_VND_CREATE_STB
,
"vnode-create-stb"
,
SVCreateStbReq
,
NULL
)
...
...
source/dnode/mgmt/mgmt_mnode/src/mmHandle.c
浏览文件 @
68b9608f
...
...
@@ -134,7 +134,7 @@ SArray *mmGetMsgHandles() {
// Requests handled by DNODE
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_DND_CREATE_MNODE_RSP
,
mmPutNodeMsgToWriteQueue
,
0
)
==
NULL
)
goto
_OVER
;
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_
D
ND_ALTER_MNODE_RSP
,
mmPutNodeMsgToWriteQueue
,
0
)
==
NULL
)
goto
_OVER
;
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_
M
ND_ALTER_MNODE_RSP
,
mmPutNodeMsgToWriteQueue
,
0
)
==
NULL
)
goto
_OVER
;
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_DND_DROP_MNODE_RSP
,
mmPutNodeMsgToWriteQueue
,
0
)
==
NULL
)
goto
_OVER
;
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_DND_CREATE_QNODE_RSP
,
mmPutNodeMsgToWriteQueue
,
0
)
==
NULL
)
goto
_OVER
;
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_DND_DROP_QNODE_RSP
,
mmPutNodeMsgToWriteQueue
,
0
)
==
NULL
)
goto
_OVER
;
...
...
@@ -190,7 +190,7 @@ SArray *mmGetMsgHandles() {
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_MND_KILL_TRANS
,
mmPutNodeMsgToWriteQueue
,
0
)
==
NULL
)
goto
_OVER
;
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_MND_GRANT
,
mmPutNodeMsgToWriteQueue
,
0
)
==
NULL
)
goto
_OVER
;
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_MND_AUTH
,
mmPutNodeMsgToReadQueue
,
0
)
==
NULL
)
goto
_OVER
;
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_
D
ND_ALTER_MNODE
,
mmPutNodeMsgToWriteQueue
,
0
)
==
NULL
)
goto
_OVER
;
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_
M
ND_ALTER_MNODE
,
mmPutNodeMsgToWriteQueue
,
0
)
==
NULL
)
goto
_OVER
;
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_MND_CREATE_TOPIC
,
mmPutNodeMsgToWriteQueue
,
0
)
==
NULL
)
goto
_OVER
;
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_MND_ALTER_TOPIC
,
mmPutNodeMsgToWriteQueue
,
0
)
==
NULL
)
goto
_OVER
;
if
(
dmSetMgmtHandle
(
pArray
,
TDMT_MND_DROP_TOPIC
,
mmPutNodeMsgToWriteQueue
,
0
)
==
NULL
)
goto
_OVER
;
...
...
source/dnode/mgmt/mgmt_vnode/src/vmFile.c
浏览文件 @
68b9608f
...
...
@@ -31,7 +31,7 @@ SVnodeObj **vmGetVnodeListFromHash(SVnodeMgmt *pMgmt, int32_t *numOfVnodes) {
SVnodeObj
*
pVnode
=
*
ppVnode
;
if
(
pVnode
&&
num
<
size
)
{
int32_t
refCount
=
atomic_add_fetch_32
(
&
pVnode
->
refCount
,
1
);
dTrace
(
"vgId:%d, acquire vnode, refCount:%d"
,
pVnode
->
vgId
,
refCount
);
//
dTrace("vgId:%d, acquire vnode, refCount:%d", pVnode->vgId, refCount);
pVnodes
[
num
]
=
(
*
ppVnode
);
num
++
;
pIter
=
taosHashIterate
(
pMgmt
->
hash
,
pIter
);
...
...
source/dnode/mgmt/mgmt_vnode/src/vmHandle.c
浏览文件 @
68b9608f
...
...
@@ -210,7 +210,7 @@ int32_t vmProcessCreateVnodeReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) {
return
-
1
;
}
dDebug
(
"vgId:%d,
create vnode req is received
, tsma:%d standby:%d"
,
createReq
.
vgId
,
createReq
.
isTsma
,
dDebug
(
"vgId:%d,
start to create vnode
, tsma:%d standby:%d"
,
createReq
.
vgId
,
createReq
.
isTsma
,
createReq
.
standby
);
vmGenerateVnodeCfg
(
&
createReq
,
&
vnodeCfg
);
...
...
@@ -294,7 +294,7 @@ int32_t vmProcessDropVnodeReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) {
}
int32_t
vgId
=
dropReq
.
vgId
;
dDebug
(
"vgId:%d,
drop vnode req is received
"
,
vgId
);
dDebug
(
"vgId:%d,
start to drop vnode
"
,
vgId
);
SVnodeObj
*
pVnode
=
vmAcquireVnode
(
pMgmt
,
vgId
);
if
(
pVnode
==
NULL
)
{
...
...
source/dnode/mgmt/mgmt_vnode/src/vmInt.c
浏览文件 @
68b9608f
...
...
@@ -25,7 +25,7 @@ SVnodeObj *vmAcquireVnode(SVnodeMgmt *pMgmt, int32_t vgId) {
terrno
=
TSDB_CODE_VND_INVALID_VGROUP_ID
;
}
else
{
int32_t
refCount
=
atomic_add_fetch_32
(
&
pVnode
->
refCount
,
1
);
dTrace
(
"vgId:%d, acquire vnode, ref:%d"
,
pVnode
->
vgId
,
refCount
);
//
dTrace("vgId:%d, acquire vnode, ref:%d", pVnode->vgId, refCount);
}
taosThreadRwlockUnlock
(
&
pMgmt
->
lock
);
...
...
@@ -37,7 +37,7 @@ void vmReleaseVnode(SVnodeMgmt *pMgmt, SVnodeObj *pVnode) {
taosThreadRwlockRdlock
(
&
pMgmt
->
lock
);
int32_t
refCount
=
atomic_sub_fetch_32
(
&
pVnode
->
refCount
,
1
);
dTrace
(
"vgId:%d, release vnode, ref:%d"
,
pVnode
->
vgId
,
refCount
);
//
dTrace("vgId:%d, release vnode, ref:%d", pVnode->vgId, refCount);
taosThreadRwlockUnlock
(
&
pMgmt
->
lock
);
}
...
...
source/dnode/mgmt/mgmt_vnode/src/vmWorker.c
浏览文件 @
68b9608f
...
...
@@ -243,33 +243,34 @@ static int32_t vmPutMsgToQueue(SVnodeMgmt *pMgmt, SRpcMsg *pMsg, EQueueType qtyp
SVnodeObj
*
pVnode
=
vmAcquireVnode
(
pMgmt
,
pHead
->
vgId
);
if
(
pVnode
==
NULL
)
{
dError
(
"vgId:%d, failed to put msg:%p into vnode queue since %s"
,
pHead
->
vgId
,
pMsg
,
terrstr
());
dError
(
"vgId:%d, failed to put msg:%p into vnode queue since %s, type:%s"
,
pHead
->
vgId
,
pMsg
,
terrstr
(),
TMSG_INFO
(
pMsg
->
msgType
));
return
terrno
!=
0
?
terrno
:
-
1
;
}
switch
(
qtype
)
{
case
QUERY_QUEUE
:
dTrace
(
"vgId:%d, msg:%p put into vnode-query queue
, type:%s"
,
pVnode
->
vgId
,
pMsg
,
TMSG_INFO
(
pMsg
->
msgType
)
);
dTrace
(
"vgId:%d, msg:%p put into vnode-query queue
"
,
pVnode
->
vgId
,
pMsg
);
taosWriteQitem
(
pVnode
->
pQueryQ
,
pMsg
);
break
;
case
FETCH_QUEUE
:
dTrace
(
"vgId:%d, msg:%p put into vnode-fetch queue
, type:%s"
,
pVnode
->
vgId
,
pMsg
,
TMSG_INFO
(
pMsg
->
msgType
)
);
dTrace
(
"vgId:%d, msg:%p put into vnode-fetch queue
"
,
pVnode
->
vgId
,
pMsg
);
taosWriteQitem
(
pVnode
->
pFetchQ
,
pMsg
);
break
;
case
WRITE_QUEUE
:
dTrace
(
"vgId:%d, msg:%p put into vnode-write queue
, type:%s"
,
pVnode
->
vgId
,
pMsg
,
TMSG_INFO
(
pMsg
->
msgType
)
);
dTrace
(
"vgId:%d, msg:%p put into vnode-write queue
"
,
pVnode
->
vgId
,
pMsg
);
taosWriteQitem
(
pVnode
->
pWriteQ
,
pMsg
);
break
;
case
SYNC_QUEUE
:
dTrace
(
"vgId:%d, msg:%p put into vnode-sync queue
, type:%s"
,
pVnode
->
vgId
,
pMsg
,
TMSG_INFO
(
pMsg
->
msgType
)
);
dTrace
(
"vgId:%d, msg:%p put into vnode-sync queue
"
,
pVnode
->
vgId
,
pMsg
);
taosWriteQitem
(
pVnode
->
pSyncQ
,
pMsg
);
break
;
case
MERGE_QUEUE
:
dTrace
(
"vgId:%d, msg:%p put into vnode-merge queue
, type:%s"
,
pVnode
->
vgId
,
pMsg
,
TMSG_INFO
(
pMsg
->
msgType
)
);
dTrace
(
"vgId:%d, msg:%p put into vnode-merge queue
"
,
pVnode
->
vgId
,
pMsg
);
taosWriteQitem
(
pVnode
->
pMergeQ
,
pMsg
);
break
;
case
APPLY_QUEUE
:
dTrace
(
"vgId:%d, msg:%p put into vnode-apply queue
, type:%s"
,
pVnode
->
vgId
,
pMsg
,
TMSG_INFO
(
pMsg
->
msgType
)
);
dTrace
(
"vgId:%d, msg:%p put into vnode-apply queue
"
,
pVnode
->
vgId
,
pMsg
);
taosWriteQitem
(
pVnode
->
pApplyQ
,
pMsg
);
break
;
default:
...
...
@@ -293,13 +294,13 @@ int32_t vmPutMsgToFetchQueue(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) { return vmPutMsg
int32_t
vmPutMsgToMergeQueue
(
SVnodeMgmt
*
pMgmt
,
SRpcMsg
*
pMsg
)
{
return
vmPutMsgToQueue
(
pMgmt
,
pMsg
,
MERGE_QUEUE
);
}
int32_t
vmPutMsgToMgmtQueue
(
SVnodeMgmt
*
pMgmt
,
SRpcMsg
*
pMsg
)
{
dTrace
(
"msg:%p, put into vnode-mgmt queue
, type:%s"
,
pMsg
,
TMSG_INFO
(
pMsg
->
msgType
)
);
dTrace
(
"msg:%p, put into vnode-mgmt queue
"
,
pMsg
);
taosWriteQitem
(
pMgmt
->
mgmtWorker
.
queue
,
pMsg
);
return
0
;
}
int32_t
vmPutMsgToMonitorQueue
(
SVnodeMgmt
*
pMgmt
,
SRpcMsg
*
pMsg
)
{
dTrace
(
"msg:%p, put into vnode-monitor queue
, type:%s"
,
pMsg
,
TMSG_INFO
(
pMsg
->
msgType
)
);
dTrace
(
"msg:%p, put into vnode-monitor queue
"
,
pMsg
);
taosWriteQitem
(
pMgmt
->
monitorWorker
.
queue
,
pMsg
);
return
0
;
}
...
...
@@ -309,11 +310,11 @@ int32_t vmPutRpcMsgToQueue(SVnodeMgmt *pMgmt, EQueueType qtype, SRpcMsg *pRpc) {
if
(
pMsg
==
NULL
)
return
-
1
;
SMsgHead
*
pHead
=
pRpc
->
pCont
;
dTrace
(
"vgId:%d, msg:%p is created, type:%s"
,
pHead
->
vgId
,
pMsg
,
TMSG_INFO
(
pMsg
->
msgType
));
pHead
->
contLen
=
htonl
(
pHead
->
contLen
);
pHead
->
vgId
=
htonl
(
pHead
->
vgId
);
memcpy
(
pMsg
,
pRpc
,
sizeof
(
SRpcMsg
));
dTrace
(
"msg:%p, is created and will put into vnode queue"
,
pMsg
);
return
vmPutMsgToQueue
(
pMgmt
,
pMsg
,
qtype
);
}
...
...
source/dnode/mgmt/node_mgmt/src/dmMgmt.c
浏览文件 @
68b9608f
...
...
@@ -229,7 +229,7 @@ SMgmtWrapper *dmAcquireWrapper(SDnode *pDnode, EDndNodeType ntype) {
taosThreadRwlockRdlock
(
&
pWrapper
->
lock
);
if
(
pWrapper
->
deployed
)
{
int32_t
refCount
=
atomic_add_fetch_32
(
&
pWrapper
->
refCount
,
1
);
dTrace
(
"node:%s, is acquired, ref:%d"
,
pWrapper
->
name
,
refCount
);
//
dTrace("node:%s, is acquired, ref:%d", pWrapper->name, refCount);
}
else
{
terrno
=
TSDB_CODE_NODE_NOT_DEPLOYED
;
pRetWrapper
=
NULL
;
...
...
@@ -245,7 +245,7 @@ int32_t dmMarkWrapper(SMgmtWrapper *pWrapper) {
taosThreadRwlockRdlock
(
&
pWrapper
->
lock
);
if
(
pWrapper
->
deployed
||
(
InParentProc
(
pWrapper
)
&&
pWrapper
->
required
))
{
int32_t
refCount
=
atomic_add_fetch_32
(
&
pWrapper
->
refCount
,
1
);
dTrace
(
"node:%s, is marked, ref:%d"
,
pWrapper
->
name
,
refCount
);
//
dTrace("node:%s, is marked, ref:%d", pWrapper->name, refCount);
}
else
{
terrno
=
TSDB_CODE_NODE_NOT_DEPLOYED
;
code
=
-
1
;
...
...
@@ -261,7 +261,7 @@ void dmReleaseWrapper(SMgmtWrapper *pWrapper) {
taosThreadRwlockRdlock
(
&
pWrapper
->
lock
);
int32_t
refCount
=
atomic_sub_fetch_32
(
&
pWrapper
->
refCount
,
1
);
taosThreadRwlockUnlock
(
&
pWrapper
->
lock
);
dTrace
(
"node:%s, is released, ref:%d"
,
pWrapper
->
name
,
refCount
);
//
dTrace("node:%s, is released, ref:%d", pWrapper->name, refCount);
}
static
void
dmGetServerStartupStatus
(
SDnode
*
pDnode
,
SServerStatusRsp
*
pStatus
)
{
...
...
source/dnode/mgmt/node_mgmt/src/dmTransport.c
浏览文件 @
68b9608f
...
...
@@ -117,7 +117,7 @@ static void dmProcessRpcMsg(SDnode *pDnode, SRpcMsg *pRpc, SEpSet *pEpSet) {
if
(
pMsg
==
NULL
)
{
goto
_OVER
;
}
dTrace
(
"msg:%p, is created
"
,
pMsg
);
dTrace
(
"msg:%p, is created
, type:%s"
,
pMsg
,
TMSG_INFO
(
pRpc
->
msgType
)
);
if
(
dmBuildNodeMsg
(
pMsg
,
pRpc
)
!=
0
)
{
goto
_OVER
;
...
...
source/dnode/mgmt/test/mnode/dmnode.cpp
浏览文件 @
68b9608f
...
...
@@ -94,7 +94,7 @@ TEST_F(DndTestMnode, 02_Alter_Mnode) {
void
*
pReq
=
rpcMallocCont
(
contLen
);
tSerializeSDCreateMnodeReq
(
pReq
,
contLen
,
&
alterReq
);
SRpcMsg
*
pRsp
=
test
.
SendReq
(
TDMT_
D
ND_ALTER_MNODE
,
pReq
,
contLen
);
SRpcMsg
*
pRsp
=
test
.
SendReq
(
TDMT_
M
ND_ALTER_MNODE
,
pReq
,
contLen
);
ASSERT_NE
(
pRsp
,
nullptr
);
ASSERT_EQ
(
pRsp
->
code
,
TSDB_CODE_INVALID_OPTION
);
}
...
...
@@ -111,7 +111,7 @@ TEST_F(DndTestMnode, 02_Alter_Mnode) {
void
*
pReq
=
rpcMallocCont
(
contLen
);
tSerializeSDCreateMnodeReq
(
pReq
,
contLen
,
&
alterReq
);
SRpcMsg
*
pRsp
=
test
.
SendReq
(
TDMT_
D
ND_ALTER_MNODE
,
pReq
,
contLen
);
SRpcMsg
*
pRsp
=
test
.
SendReq
(
TDMT_
M
ND_ALTER_MNODE
,
pReq
,
contLen
);
ASSERT_NE
(
pRsp
,
nullptr
);
ASSERT_EQ
(
pRsp
->
code
,
TSDB_CODE_INVALID_OPTION
);
}
...
...
@@ -128,7 +128,7 @@ TEST_F(DndTestMnode, 02_Alter_Mnode) {
void
*
pReq
=
rpcMallocCont
(
contLen
);
tSerializeSDCreateMnodeReq
(
pReq
,
contLen
,
&
alterReq
);
SRpcMsg
*
pRsp
=
test
.
SendReq
(
TDMT_
D
ND_ALTER_MNODE
,
pReq
,
contLen
);
SRpcMsg
*
pRsp
=
test
.
SendReq
(
TDMT_
M
ND_ALTER_MNODE
,
pReq
,
contLen
);
ASSERT_NE
(
pRsp
,
nullptr
);
ASSERT_EQ
(
pRsp
->
code
,
0
);
}
...
...
@@ -186,7 +186,7 @@ TEST_F(DndTestMnode, 03_Drop_Mnode) {
void
*
pReq
=
rpcMallocCont
(
contLen
);
tSerializeSDCreateMnodeReq
(
pReq
,
contLen
,
&
alterReq
);
SRpcMsg
*
pRsp
=
test
.
SendReq
(
TDMT_
D
ND_ALTER_MNODE
,
pReq
,
contLen
);
SRpcMsg
*
pRsp
=
test
.
SendReq
(
TDMT_
M
ND_ALTER_MNODE
,
pReq
,
contLen
);
ASSERT_NE
(
pRsp
,
nullptr
);
ASSERT_EQ
(
pRsp
->
code
,
TSDB_CODE_NODE_NOT_DEPLOYED
);
}
...
...
source/dnode/mnode/impl/src/mndMnode.c
浏览文件 @
68b9608f
...
...
@@ -53,10 +53,10 @@ int32_t mndInitMnode(SMnode *pMnode) {
};
mndSetMsgHandle
(
pMnode
,
TDMT_MND_CREATE_MNODE
,
mndProcessCreateMnodeReq
);
mndSetMsgHandle
(
pMnode
,
TDMT_
D
ND_ALTER_MNODE
,
mndProcessAlterMnodeReq
);
mndSetMsgHandle
(
pMnode
,
TDMT_
M
ND_ALTER_MNODE
,
mndProcessAlterMnodeReq
);
mndSetMsgHandle
(
pMnode
,
TDMT_MND_DROP_MNODE
,
mndProcessDropMnodeReq
);
mndSetMsgHandle
(
pMnode
,
TDMT_DND_CREATE_MNODE_RSP
,
mndProcessCreateMnodeRsp
);
mndSetMsgHandle
(
pMnode
,
TDMT_
D
ND_ALTER_MNODE_RSP
,
mndProcessAlterMnodeRsp
);
mndSetMsgHandle
(
pMnode
,
TDMT_
M
ND_ALTER_MNODE_RSP
,
mndProcessAlterMnodeRsp
);
mndSetMsgHandle
(
pMnode
,
TDMT_DND_DROP_MNODE_RSP
,
mndProcessDropMnodeRsp
);
mndAddShowRetrieveHandle
(
pMnode
,
TSDB_MGMT_TABLE_MNODE
,
mndRetrieveMnodes
);
...
...
@@ -338,7 +338,7 @@ static int32_t mndSetCreateMnodeRedoActions(SMnode *pMnode, STrans *pTrans, SDno
.
epSet
=
alterEpset
,
.
pCont
=
pReq
,
.
contLen
=
contLen
,
.
msgType
=
TDMT_
D
ND_ALTER_MNODE
,
.
msgType
=
TDMT_
M
ND_ALTER_MNODE
,
.
acceptableCode
=
0
,
};
...
...
@@ -506,7 +506,7 @@ static int32_t mndSetDropMnodeRedoActions(SMnode *pMnode, STrans *pTrans, SDnode
.
epSet
=
alterEpset
,
.
pCont
=
pReq
,
.
contLen
=
contLen
,
.
msgType
=
TDMT_
D
ND_ALTER_MNODE
,
.
msgType
=
TDMT_
M
ND_ALTER_MNODE
,
.
acceptableCode
=
0
,
};
...
...
tests/script/tsim/db/alter_replica_13.sim
浏览文件 @
68b9608f
...
...
@@ -128,7 +128,6 @@ if $data[0][8] != follower then
endi
print ============= step5: stop dnode 2
return
sql select * from db.stb
if $rows != 1 then
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录