Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
14acfd35
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
14acfd35
编写于
4月 17, 2020
作者:
S
slguan
提交者:
GitHub
4月 17, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1631 from taosdata/feature/mpeer
fix status message error
上级
b7147d95
c2067ab4
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
28 addition
and
21 deletion
+28
-21
CMakeLists.txt
CMakeLists.txt
+5
-4
src/dnode/src/dnodeMClient.c
src/dnode/src/dnodeMClient.c
+15
-15
src/inc/taosmsg.h
src/inc/taosmsg.h
+1
-1
src/mnode/src/mgmtDnode.c
src/mnode/src/mgmtDnode.c
+7
-1
未找到文件。
CMakeLists.txt
浏览文件 @
14acfd35
CMAKE_MINIMUM_REQUIRED
(
VERSION 2.8
)
PROJECT
(
TDengine
)
SET
(
TD_
CLUSTER
FALSE
)
SET
(
TD_
SYNC
FALSE
)
SET
(
TD_ACCOUNT FALSE
)
SET
(
TD_VPEER FALSE
)
SET
(
TD_MPEER FALSE
)
SET
(
TD_ADMIN FALSE
)
SET
(
TD_GRANT FALSE
)
SET
(
TD_COVER FALSE
)
SET
(
TD_MEM_CHECK FALSE
)
SET
(
TD_PAGMODE_LITE FALSE
)
SET
(
TD_GODLL FALSE
)
SET
(
TD_MEM_CHECK FALSE
)
SET
(
TD_COMMUNITY_DIR
${
PROJECT_SOURCE_DIR
}
)
MESSAGE
(
STATUS
"Community directory: "
${
TD_COMMUNITY_DIR
}
)
...
...
src/dnode/src/dnodeMClient.c
浏览文件 @
14acfd35
...
...
@@ -142,9 +142,9 @@ static void dnodeProcessStatusRsp(SRpcMsg *pMsg) {
}
SDMStatusRsp
*
pStatusRsp
=
pMsg
->
pCont
;
SDMNodeInfos
*
m
peers
=
&
pStatusRsp
->
mpeer
s
;
if
(
m
peer
s
->
nodeNum
<=
0
)
{
dError
(
"status msg is invalid, num of ips is %d"
,
m
peer
s
->
nodeNum
);
SDMNodeInfos
*
m
nodes
=
&
pStatusRsp
->
mnode
s
;
if
(
m
node
s
->
nodeNum
<=
0
)
{
dError
(
"status msg is invalid, num of ips is %d"
,
m
node
s
->
nodeNum
);
taosTmrReset
(
dnodeSendStatusMsg
,
tsStatusInterval
*
1000
,
NULL
,
tsDnodeTmr
,
&
tsStatusTimer
);
return
;
}
...
...
@@ -159,23 +159,23 @@ static void dnodeProcessStatusRsp(SRpcMsg *pMsg) {
dnodeUpdateDnodeInfo
(
pState
->
dnodeId
);
SRpcIpSet
mgmtIpSet
=
{
0
};
mgmtIpSet
.
inUse
=
m
peer
s
->
inUse
;
mgmtIpSet
.
numOfIps
=
m
peer
s
->
nodeNum
;
mgmtIpSet
.
port
=
htons
(
m
peer
s
->
nodeInfos
[
0
].
nodePort
);
for
(
int32_t
i
=
0
;
i
<
m
peer
s
->
nodeNum
;
i
++
)
{
mgmtIpSet
.
ip
[
i
]
=
htonl
(
m
peer
s
->
nodeInfos
[
i
].
nodeIp
);
mgmtIpSet
.
inUse
=
m
node
s
->
inUse
;
mgmtIpSet
.
numOfIps
=
m
node
s
->
nodeNum
;
mgmtIpSet
.
port
=
htons
(
m
node
s
->
nodeInfos
[
0
].
nodePort
);
for
(
int32_t
i
=
0
;
i
<
m
node
s
->
nodeNum
;
i
++
)
{
mgmtIpSet
.
ip
[
i
]
=
htonl
(
m
node
s
->
nodeInfos
[
i
].
nodeIp
);
}
if
(
memcmp
(
&
mgmtIpSet
,
&
tsMnodeIpList
,
sizeof
(
SRpcIpSet
))
!=
0
||
tsMnodeInfos
.
nodeNum
==
0
)
{
memcpy
(
&
tsMnodeIpList
,
&
mgmtIpSet
,
sizeof
(
SRpcIpSet
));
tsMnodeInfos
.
inUse
=
m
peer
s
->
inUse
;
tsMnodeInfos
.
nodeNum
=
m
peer
s
->
nodeNum
;
tsMnodeInfos
.
inUse
=
m
node
s
->
inUse
;
tsMnodeInfos
.
nodeNum
=
m
node
s
->
nodeNum
;
dPrint
(
"mnode ip list is changed, numOfIps:%d inUse:%d"
,
tsMnodeInfos
.
nodeNum
,
tsMnodeInfos
.
inUse
);
for
(
int32_t
i
=
0
;
i
<
m
peer
s
->
nodeNum
;
i
++
)
{
tsMnodeInfos
.
nodeInfos
[
i
].
nodeId
=
htonl
(
m
peer
s
->
nodeInfos
[
i
].
nodeId
);
tsMnodeInfos
.
nodeInfos
[
i
].
nodeIp
=
htonl
(
m
peer
s
->
nodeInfos
[
i
].
nodeIp
);
tsMnodeInfos
.
nodeInfos
[
i
].
nodePort
=
htons
(
m
peer
s
->
nodeInfos
[
i
].
nodePort
);
strcpy
(
tsMnodeInfos
.
nodeInfos
[
i
].
nodeName
,
m
peer
s
->
nodeInfos
[
i
].
nodeName
);
for
(
int32_t
i
=
0
;
i
<
m
node
s
->
nodeNum
;
i
++
)
{
tsMnodeInfos
.
nodeInfos
[
i
].
nodeId
=
htonl
(
m
node
s
->
nodeInfos
[
i
].
nodeId
);
tsMnodeInfos
.
nodeInfos
[
i
].
nodeIp
=
htonl
(
m
node
s
->
nodeInfos
[
i
].
nodeIp
);
tsMnodeInfos
.
nodeInfos
[
i
].
nodePort
=
htons
(
m
node
s
->
nodeInfos
[
i
].
nodePort
);
strcpy
(
tsMnodeInfos
.
nodeInfos
[
i
].
nodeName
,
m
node
s
->
nodeInfos
[
i
].
nodeName
);
dPrint
(
"mnode:%d, ip:%s:%u name:%s"
,
tsMnodeInfos
.
nodeInfos
[
i
].
nodeId
,
taosIpStr
(
tsMnodeInfos
.
nodeInfos
[
i
].
nodeIp
),
tsMnodeInfos
.
nodeInfos
[
i
].
nodePort
,
tsMnodeInfos
.
nodeInfos
[
i
].
nodeName
);
...
...
src/inc/taosmsg.h
浏览文件 @
14acfd35
...
...
@@ -608,7 +608,7 @@ typedef struct {
}
SDMNodeInfos
;
typedef
struct
{
SDMNodeInfos
m
peer
s
;
SDMNodeInfos
m
node
s
;
SDnodeState
dnodeState
;
SVnodeAccess
vnodeAccess
[];
}
SDMStatusRsp
;
...
...
src/mnode/src/mgmtDnode.c
浏览文件 @
14acfd35
...
...
@@ -63,6 +63,12 @@ static int32_t mgmtDnodeActionInsert(SSdbOperDesc *pOper) {
pDnode
->
status
=
TAOS_DN_STATUS_OFFLINE
;
}
pDnode
->
mnodeShellPort
=
tsMnodeShellPort
;
pDnode
->
mnodeDnodePort
=
tsMnodeDnodePort
;
pDnode
->
dnodeShellPort
=
tsDnodeShellPort
;
pDnode
->
dnodeMnodePort
=
tsDnodeMnodePort
;
pDnode
->
syncPort
=
0
;
return
TSDB_CODE_SUCCESS
;
}
...
...
@@ -344,7 +350,7 @@ void mgmtProcessDnodeStatusMsg(SRpcMsg *rpcMsg) {
return
;
}
mgmtGetMnodeList
(
&
pRsp
->
m
peer
s
);
mgmtGetMnodeList
(
&
pRsp
->
m
node
s
);
pRsp
->
dnodeState
.
dnodeId
=
htonl
(
pDnode
->
dnodeId
);
pRsp
->
dnodeState
.
moduleStatus
=
htonl
(
pDnode
->
moduleStatus
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录