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
)
CMAKE_MINIMUM_REQUIRED
(
VERSION 2.8
)
PROJECT
(
TDengine
)
PROJECT
(
TDengine
)
SET
(
TD_
CLUSTER
FALSE
)
SET
(
TD_
SYNC
FALSE
)
SET
(
TD_ACCOUNT FALSE
)
SET
(
TD_ACCOUNT FALSE
)
SET
(
TD_VPEER FALSE
)
SET
(
TD_ADMIN FALSE
)
SET
(
TD_MPEER FALSE
)
SET
(
TD_GRANT FALSE
)
SET
(
TD_GRANT FALSE
)
SET
(
TD_COVER FALSE
)
SET
(
TD_COVER FALSE
)
SET
(
TD_MEM_CHECK FALSE
)
SET
(
TD_PAGMODE_LITE FALSE
)
SET
(
TD_PAGMODE_LITE FALSE
)
SET
(
TD_GODLL FALSE
)
SET
(
TD_GODLL FALSE
)
SET
(
TD_MEM_CHECK FALSE
)
SET
(
TD_COMMUNITY_DIR
${
PROJECT_SOURCE_DIR
}
)
SET
(
TD_COMMUNITY_DIR
${
PROJECT_SOURCE_DIR
}
)
MESSAGE
(
STATUS
"Community directory: "
${
TD_COMMUNITY_DIR
}
)
MESSAGE
(
STATUS
"Community directory: "
${
TD_COMMUNITY_DIR
}
)
...
...
src/dnode/src/dnodeMClient.c
浏览文件 @
14acfd35
...
@@ -142,9 +142,9 @@ static void dnodeProcessStatusRsp(SRpcMsg *pMsg) {
...
@@ -142,9 +142,9 @@ static void dnodeProcessStatusRsp(SRpcMsg *pMsg) {
}
}
SDMStatusRsp
*
pStatusRsp
=
pMsg
->
pCont
;
SDMStatusRsp
*
pStatusRsp
=
pMsg
->
pCont
;
SDMNodeInfos
*
m
peers
=
&
pStatusRsp
->
mpeer
s
;
SDMNodeInfos
*
m
nodes
=
&
pStatusRsp
->
mnode
s
;
if
(
m
peer
s
->
nodeNum
<=
0
)
{
if
(
m
node
s
->
nodeNum
<=
0
)
{
dError
(
"status msg is invalid, num of ips is %d"
,
m
peer
s
->
nodeNum
);
dError
(
"status msg is invalid, num of ips is %d"
,
m
node
s
->
nodeNum
);
taosTmrReset
(
dnodeSendStatusMsg
,
tsStatusInterval
*
1000
,
NULL
,
tsDnodeTmr
,
&
tsStatusTimer
);
taosTmrReset
(
dnodeSendStatusMsg
,
tsStatusInterval
*
1000
,
NULL
,
tsDnodeTmr
,
&
tsStatusTimer
);
return
;
return
;
}
}
...
@@ -159,23 +159,23 @@ static void dnodeProcessStatusRsp(SRpcMsg *pMsg) {
...
@@ -159,23 +159,23 @@ static void dnodeProcessStatusRsp(SRpcMsg *pMsg) {
dnodeUpdateDnodeInfo
(
pState
->
dnodeId
);
dnodeUpdateDnodeInfo
(
pState
->
dnodeId
);
SRpcIpSet
mgmtIpSet
=
{
0
};
SRpcIpSet
mgmtIpSet
=
{
0
};
mgmtIpSet
.
inUse
=
m
peer
s
->
inUse
;
mgmtIpSet
.
inUse
=
m
node
s
->
inUse
;
mgmtIpSet
.
numOfIps
=
m
peer
s
->
nodeNum
;
mgmtIpSet
.
numOfIps
=
m
node
s
->
nodeNum
;
mgmtIpSet
.
port
=
htons
(
m
peer
s
->
nodeInfos
[
0
].
nodePort
);
mgmtIpSet
.
port
=
htons
(
m
node
s
->
nodeInfos
[
0
].
nodePort
);
for
(
int32_t
i
=
0
;
i
<
m
peer
s
->
nodeNum
;
i
++
)
{
for
(
int32_t
i
=
0
;
i
<
m
node
s
->
nodeNum
;
i
++
)
{
mgmtIpSet
.
ip
[
i
]
=
htonl
(
m
peer
s
->
nodeInfos
[
i
].
nodeIp
);
mgmtIpSet
.
ip
[
i
]
=
htonl
(
m
node
s
->
nodeInfos
[
i
].
nodeIp
);
}
}
if
(
memcmp
(
&
mgmtIpSet
,
&
tsMnodeIpList
,
sizeof
(
SRpcIpSet
))
!=
0
||
tsMnodeInfos
.
nodeNum
==
0
)
{
if
(
memcmp
(
&
mgmtIpSet
,
&
tsMnodeIpList
,
sizeof
(
SRpcIpSet
))
!=
0
||
tsMnodeInfos
.
nodeNum
==
0
)
{
memcpy
(
&
tsMnodeIpList
,
&
mgmtIpSet
,
sizeof
(
SRpcIpSet
));
memcpy
(
&
tsMnodeIpList
,
&
mgmtIpSet
,
sizeof
(
SRpcIpSet
));
tsMnodeInfos
.
inUse
=
m
peer
s
->
inUse
;
tsMnodeInfos
.
inUse
=
m
node
s
->
inUse
;
tsMnodeInfos
.
nodeNum
=
m
peer
s
->
nodeNum
;
tsMnodeInfos
.
nodeNum
=
m
node
s
->
nodeNum
;
dPrint
(
"mnode ip list is changed, numOfIps:%d inUse:%d"
,
tsMnodeInfos
.
nodeNum
,
tsMnodeInfos
.
inUse
);
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
++
)
{
for
(
int32_t
i
=
0
;
i
<
m
node
s
->
nodeNum
;
i
++
)
{
tsMnodeInfos
.
nodeInfos
[
i
].
nodeId
=
htonl
(
m
peer
s
->
nodeInfos
[
i
].
nodeId
);
tsMnodeInfos
.
nodeInfos
[
i
].
nodeId
=
htonl
(
m
node
s
->
nodeInfos
[
i
].
nodeId
);
tsMnodeInfos
.
nodeInfos
[
i
].
nodeIp
=
htonl
(
m
peer
s
->
nodeInfos
[
i
].
nodeIp
);
tsMnodeInfos
.
nodeInfos
[
i
].
nodeIp
=
htonl
(
m
node
s
->
nodeInfos
[
i
].
nodeIp
);
tsMnodeInfos
.
nodeInfos
[
i
].
nodePort
=
htons
(
m
peer
s
->
nodeInfos
[
i
].
nodePort
);
tsMnodeInfos
.
nodeInfos
[
i
].
nodePort
=
htons
(
m
node
s
->
nodeInfos
[
i
].
nodePort
);
strcpy
(
tsMnodeInfos
.
nodeInfos
[
i
].
nodeName
,
m
peer
s
->
nodeInfos
[
i
].
nodeName
);
strcpy
(
tsMnodeInfos
.
nodeInfos
[
i
].
nodeName
,
m
node
s
->
nodeInfos
[
i
].
nodeName
);
dPrint
(
"mnode:%d, ip:%s:%u name:%s"
,
tsMnodeInfos
.
nodeInfos
[
i
].
nodeId
,
dPrint
(
"mnode:%d, ip:%s:%u name:%s"
,
tsMnodeInfos
.
nodeInfos
[
i
].
nodeId
,
taosIpStr
(
tsMnodeInfos
.
nodeInfos
[
i
].
nodeIp
),
tsMnodeInfos
.
nodeInfos
[
i
].
nodePort
,
taosIpStr
(
tsMnodeInfos
.
nodeInfos
[
i
].
nodeIp
),
tsMnodeInfos
.
nodeInfos
[
i
].
nodePort
,
tsMnodeInfos
.
nodeInfos
[
i
].
nodeName
);
tsMnodeInfos
.
nodeInfos
[
i
].
nodeName
);
...
...
src/inc/taosmsg.h
浏览文件 @
14acfd35
...
@@ -608,7 +608,7 @@ typedef struct {
...
@@ -608,7 +608,7 @@ typedef struct {
}
SDMNodeInfos
;
}
SDMNodeInfos
;
typedef
struct
{
typedef
struct
{
SDMNodeInfos
m
peer
s
;
SDMNodeInfos
m
node
s
;
SDnodeState
dnodeState
;
SDnodeState
dnodeState
;
SVnodeAccess
vnodeAccess
[];
SVnodeAccess
vnodeAccess
[];
}
SDMStatusRsp
;
}
SDMStatusRsp
;
...
...
src/mnode/src/mgmtDnode.c
浏览文件 @
14acfd35
...
@@ -63,6 +63,12 @@ static int32_t mgmtDnodeActionInsert(SSdbOperDesc *pOper) {
...
@@ -63,6 +63,12 @@ static int32_t mgmtDnodeActionInsert(SSdbOperDesc *pOper) {
pDnode
->
status
=
TAOS_DN_STATUS_OFFLINE
;
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
;
return
TSDB_CODE_SUCCESS
;
}
}
...
@@ -344,7 +350,7 @@ void mgmtProcessDnodeStatusMsg(SRpcMsg *rpcMsg) {
...
@@ -344,7 +350,7 @@ void mgmtProcessDnodeStatusMsg(SRpcMsg *rpcMsg) {
return
;
return
;
}
}
mgmtGetMnodeList
(
&
pRsp
->
m
peer
s
);
mgmtGetMnodeList
(
&
pRsp
->
m
node
s
);
pRsp
->
dnodeState
.
dnodeId
=
htonl
(
pDnode
->
dnodeId
);
pRsp
->
dnodeState
.
dnodeId
=
htonl
(
pDnode
->
dnodeId
);
pRsp
->
dnodeState
.
moduleStatus
=
htonl
(
pDnode
->
moduleStatus
);
pRsp
->
dnodeState
.
moduleStatus
=
htonl
(
pDnode
->
moduleStatus
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录