Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
acd3372a
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看板
未验证
提交
acd3372a
编写于
12月 09, 2022
作者:
S
Shengliang Guan
提交者:
GitHub
12月 09, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #18829 from taosdata/fix/TD-20975
enh: TD-20975
上级
bf85790e
bf48419d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
16 addition
and
7 deletion
+16
-7
source/dnode/mgmt/mgmt_dnode/src/dmHandle.c
source/dnode/mgmt/mgmt_dnode/src/dmHandle.c
+8
-2
source/dnode/mgmt/mgmt_dnode/src/dmWorker.c
source/dnode/mgmt/mgmt_dnode/src/dmWorker.c
+8
-2
source/libs/transport/src/transCli.c
source/libs/transport/src/transCli.c
+0
-3
未找到文件。
source/dnode/mgmt/mgmt_dnode/src/dmHandle.c
浏览文件 @
acd3372a
...
@@ -103,7 +103,12 @@ void dmSendStatusReq(SDnodeMgmt *pMgmt) {
...
@@ -103,7 +103,12 @@ void dmSendStatusReq(SDnodeMgmt *pMgmt) {
tSerializeSStatusReq
(
pHead
,
contLen
,
&
req
);
tSerializeSStatusReq
(
pHead
,
contLen
,
&
req
);
tFreeSStatusReq
(
&
req
);
tFreeSStatusReq
(
&
req
);
SRpcMsg
rpcMsg
=
{.
pCont
=
pHead
,
.
contLen
=
contLen
,
.
msgType
=
TDMT_MND_STATUS
,
.
info
.
ahandle
=
(
void
*
)
0x9527
};
SRpcMsg
rpcMsg
=
{.
pCont
=
pHead
,
.
contLen
=
contLen
,
.
msgType
=
TDMT_MND_STATUS
,
.
info
.
ahandle
=
(
void
*
)
0x9527
,
.
info
.
refId
=
0
,
.
info
.
noResp
=
0
};
SRpcMsg
rpcRsp
=
{
0
};
SRpcMsg
rpcRsp
=
{
0
};
dTrace
(
"send status req to mnode, dnodeVer:%"
PRId64
" statusSeq:%d"
,
req
.
dnodeVer
,
req
.
statusSeq
);
dTrace
(
"send status req to mnode, dnodeVer:%"
PRId64
" statusSeq:%d"
,
req
.
dnodeVer
,
req
.
statusSeq
);
...
@@ -150,7 +155,8 @@ static void dmGetServerRunStatus(SDnodeMgmt *pMgmt, SServerStatusRsp *pStatus) {
...
@@ -150,7 +155,8 @@ static void dmGetServerRunStatus(SDnodeMgmt *pMgmt, SServerStatusRsp *pStatus) {
SServerStatusRsp
statusRsp
=
{
0
};
SServerStatusRsp
statusRsp
=
{
0
};
SMonMloadInfo
minfo
=
{
0
};
SMonMloadInfo
minfo
=
{
0
};
(
*
pMgmt
->
getMnodeLoadsFp
)(
&
minfo
);
(
*
pMgmt
->
getMnodeLoadsFp
)(
&
minfo
);
if
(
minfo
.
isMnode
&&
(
minfo
.
load
.
syncState
==
TAOS_SYNC_STATE_ERROR
||
minfo
.
load
.
syncState
==
TAOS_SYNC_STATE_OFFLINE
))
{
if
(
minfo
.
isMnode
&&
(
minfo
.
load
.
syncState
==
TAOS_SYNC_STATE_ERROR
||
minfo
.
load
.
syncState
==
TAOS_SYNC_STATE_OFFLINE
))
{
pStatus
->
statusCode
=
TSDB_SRV_STATUS_SERVICE_DEGRADED
;
pStatus
->
statusCode
=
TSDB_SRV_STATUS_SERVICE_DEGRADED
;
snprintf
(
pStatus
->
details
,
sizeof
(
pStatus
->
details
),
"mnode sync state is %s"
,
syncStr
(
minfo
.
load
.
syncState
));
snprintf
(
pStatus
->
details
,
sizeof
(
pStatus
->
details
),
"mnode sync state is %s"
,
syncStr
(
minfo
.
load
.
syncState
));
return
;
return
;
...
...
source/dnode/mgmt/mgmt_dnode/src/dmWorker.c
浏览文件 @
acd3372a
...
@@ -20,7 +20,9 @@ static void *dmStatusThreadFp(void *param) {
...
@@ -20,7 +20,9 @@ static void *dmStatusThreadFp(void *param) {
SDnodeMgmt
*
pMgmt
=
param
;
SDnodeMgmt
*
pMgmt
=
param
;
int64_t
lastTime
=
taosGetTimestampMs
();
int64_t
lastTime
=
taosGetTimestampMs
();
setThreadName
(
"dnode-status"
);
setThreadName
(
"dnode-status"
);
const
static
int16_t
TRIM_FREQ
=
30
;
int32_t
trimCount
=
0
;
while
(
1
)
{
while
(
1
)
{
taosMsleep
(
200
);
taosMsleep
(
200
);
if
(
pMgmt
->
pData
->
dropped
||
pMgmt
->
pData
->
stopped
)
break
;
if
(
pMgmt
->
pData
->
dropped
||
pMgmt
->
pData
->
stopped
)
break
;
...
@@ -28,9 +30,13 @@ static void *dmStatusThreadFp(void *param) {
...
@@ -28,9 +30,13 @@ static void *dmStatusThreadFp(void *param) {
int64_t
curTime
=
taosGetTimestampMs
();
int64_t
curTime
=
taosGetTimestampMs
();
float
interval
=
(
curTime
-
lastTime
)
/
1000
.
0
f
;
float
interval
=
(
curTime
-
lastTime
)
/
1000
.
0
f
;
if
(
interval
>=
tsStatusInterval
)
{
if
(
interval
>=
tsStatusInterval
)
{
taosMemoryTrim
(
0
);
dmSendStatusReq
(
pMgmt
);
dmSendStatusReq
(
pMgmt
);
lastTime
=
curTime
;
lastTime
=
curTime
;
trimCount
=
(
trimCount
+
1
)
%
TRIM_FREQ
;
if
(
trimCount
==
0
)
{
taosMemoryTrim
(
0
);
}
}
}
}
}
...
...
source/libs/transport/src/transCli.c
浏览文件 @
acd3372a
...
@@ -1052,9 +1052,6 @@ void cliHandleReq(SCliMsg* pMsg, SCliThrd* pThrd) {
...
@@ -1052,9 +1052,6 @@ void cliHandleReq(SCliMsg* pMsg, SCliThrd* pThrd) {
cliMayCvtFqdnToIp
(
&
pCtx
->
epSet
,
&
pThrd
->
cvtAddr
);
cliMayCvtFqdnToIp
(
&
pCtx
->
epSet
,
&
pThrd
->
cvtAddr
);
char
tbuf
[
256
]
=
{
0
};
EPSET_DEBUG_STR
(
&
pCtx
->
epSet
,
tbuf
);
if
(
!
EPSET_IS_VALID
(
&
pCtx
->
epSet
))
{
if
(
!
EPSET_IS_VALID
(
&
pCtx
->
epSet
))
{
tError
(
"invalid epset"
);
tError
(
"invalid epset"
);
destroyCmsg
(
pMsg
);
destroyCmsg
(
pMsg
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录